tag_api module

class tag_api.TagApi(key: str)

Bases: clockify.wrapper.Wrapper

create_tag(tag: clockify.model.tag_model.Tag) clockify.model.tag_model.Tag

Create a Tag and return it as a Tag object.

Parameters

tag (Tag) – Tag to create.

Returns

Created Tag object.

Return type

Tag

delete_tag(workspace_id: str, tag_id: str) clockify.model.tag_model.Tag

Delete a Tag and return it as a Tag object

Parameters
  • workspace_id (str) – ID of the clockify workspace.

  • tag_id (str) – ID of the clockify tag.

Returns

Deleted Tab object.

Return type

Tag

get_tag(workspace_id: str, tag_id: str) clockify.model.tag_model.Tag

Return one Tag object

Parameters
  • workspace_id (str) – ID of the clockify workspace.

  • tag_id (str) – ID of the clockify tag.

Returns

Tag object.

Return type

Tag

get_tags(workspace_id: str, params: clockify.model.tag_model.TagGetParams = TagGetParams(name=None, archived=None, page=1, page_size=50)) List[clockify.model.tag_model.Tag]

Return a list of Tag objects.

Parameters
  • workspace_id (str) – ID of the clockify workspace.

  • params (TagGetParams, optional) – Path parameters. Defaults to TagGetParams().

Returns

List of Tag objects.

Return type

List[Tag]

update_tag(tag: clockify.model.tag_model.Tag) clockify.model.tag_model.Tag

Update a Tag and return it as a Tag object

Parameters

tag (Tag) – Tag to update.

Returns

Updated Tag object.

Return type

Tag