Skip to content

Labels

get_label(label_id) async

Get a specific label.

Parameters:

Name Type Description Default
label_id int

The ID of the label to get.

required

Returns:

Type Description
Label

The label.

create_label(label) async

Create a label.

Parameters:

Name Type Description Default
label Label

The label to create. The fields id, creation_time and update_time are ignored.

required

Returns:

Type Description
str

The location of the label.

delete_label(label_id) async

Delete a label.

Parameters:

Name Type Description Default
label_id int

The ID of the label to delete.

required

get_labels(query=None, sort=None, page=1, page_size=10, name=None, scope=None, project_id=None, limit=None) async

Get a list of labels.

Parameters:

Name Type Description Default
query Optional[str]

The query string to filter by.

None
sort Optional[str]

The sort order of the results.

None
page int

The page of results to return.

1
page_size int

The number of results to return per page.

10
name Optional[str]

The name of the label to filter by.

None
scope Optional[str]

The scope of the label to filter by. Valid values are "g" and "p". "g" for global labels and "p" for project labels.

None
project_id Optional[int]

The ID of the project to filter by. Required when scope is "p".

None
limit Optional[int]

The maximum number of results to return.

None

Returns:

Type Description
List[Label]

The list of labels.