API
The API provides simple functions for embeddings in markdown documents.
Currently, there are three distinct kinds of embeddings: Section/subsection partial document embeddings, sequence like embeddings, and single item embeddings.
Document Part Functions
The following function produces markdown constructs that map parent issues with children issues onto subsections and subsubsections:
test_plans(parents_query_text, children_query_text)- parent issues become subsections and children issues (including their description as content) become subsubsections
Sequence Functions
The following functions produce markdown constructs that receive sequences:
table(query_text)- a markdown GFM tabledl(query_text)- a definition (description) listol(query_text)- an ordered listul(query_text)- an unordered list
Single Item Returning Functions
h1(query_text)- a level 1 headingh2(query_text)- a level 2 headingh3(query_text)- a level 3 headingh4(query_text)- a level 4 headingh5(query_text)- a level 5 headingh6(query_text)- a level 6 heading
Additional Parameters
All functions accept an optional keyword parameter data that when given will render that data instead of querying a server.
This can be helpful to test the format without always querying the server.
For this data inject to work, the following characteristic must be present in the data:
datavalue is a dict- with at least one
rowskey with a list as value.- that list contains one or more dicts with
- the expected keys (from the column spec) and
- the values that should be injected.
- that list contains one or more dicts with
- with at least one
from laskea import *
ul('', data={'rows': [{'key': 'A', 'summary': 'B'}, {'key': 'C', 'summary': 'D'}]})
This should yield the following output:
- [A](https://remote-jira-instance.example.com/browse/A) - B
- [C](https://remote-jira-instance.example.com/browse/C) - D