timechimp.api.user_contracts package

Module contents

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

Create a user contract

Parameters
  • user_contracts – the json representation of the user contract

  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

Returns

TimeChimp user contracts requests response object

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

Delete a user contract

Parameters
  • user_contract_id – the unique id of the user

  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

  • **kwargs – extra parameters for requests.get

Returns

TimeChimp user contracts requests response object

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

Get all the user contracts

Parameters
  • version – the version of the endpoint to use

  • params – the query string parameters

  • to_json – convert the request response to a json object

Returns

TimeChimp user contracts requests response object

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

Get a user contract by id

Parameters
  • user_contract_id – the unique id of the user contract

  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

  • **kwargs – extra parameters for requests.get

Returns

TimeChimp user contracts requests response object

timechimp.api.user_contracts.get_by_user(user_id: int, version: str = '1', to_json: bool = False) Union[requests.models.Response, List[dict]]

Get user contracts by user

Parameters
  • user_id – the unique id of the user

  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

  • **kwargs – extra parameters for requests.get

Returns

TimeChimp user contracts requests response object

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

Update a user contract

Parameters
  • user_contracts – the json representation of the user contract

  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

Returns

TimeChimp user contracts requests response object