timechimp.api.tasks package

Module contents

timechimp.api.tasks.create(task: dict, version: str = '1', to_json: bool = False) Union[requests.models.Response, dict]

Create a new task entry

Parameters
  • task – the JSON representation of the task entry to create

  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

Returns

TimeChimp task requests response object

timechimp.api.tasks.delete(task_id: int, version: str = '1', to_json: bool = False) Union[requests.models.Response, dict]

Delete a task entry by id

Parameters
  • task_id – the JSON representation of the task entry to create

  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

Returns

TimeChimp task requests response object

timechimp.api.tasks.get_all(version: str = '1', to_json: bool = False) Union[requests.models.Response, List[dict]]

Get all tasks

Parameters
  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

Returns

TimeChimp tasks requests response object

timechimp.api.tasks.get_by_id(task_id: int, version: str = '1', to_json: bool = False) Union[requests.models.Response, dict]

Get a task by id

Parameters
  • version – the version of the endpoint to use

  • task_id – the unique id of the task

  • to_json – convert the request response to a json object

Returns

TimeChimp tasks requests response object

timechimp.api.tasks.update(task: dict, version: str = '1', to_json: bool = False) Union[requests.models.Response, dict]

Update a task

Parameters
  • version – the version of the endpoint to use

  • task – the dict containing the new tasks properties values

  • to_json – convert the request response to a json object

Returns

TimeChimp tasks requests response object