timechimp.api.customers package

Module contents

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

Create a new customer entry

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

  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

Returns

TimeChimp customer requests response object

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

Delete a customer entry by id

Parameters
  • customer_id – the JSON representation of the customer entry to create

  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

Returns

TimeChimp customer requests response object

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

Get all the customer entries

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 customer requests response object

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

Get a customer entry by id

Parameters
  • customer_id – the unique id of the customer entry

  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

Returns

TimeChimp customer requests response object

timechimp.api.customers.get_by_name(customer_name: str, version: str = '1', to_json: bool = False) Union[requests.models.Response, dict]

Get a customer entry by id

Parameters
  • customer_name – the unique name of the customer entry

  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

Returns

TimeChimp customer requests response object

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

Get a customer entry by id

Parameters
  • relation_id – the unique id of the relation entry

  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

Returns

TimeChimp customer requests response object

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

Update a customer entry

Parameters
  • customer – the JSON representation of the customer entry to update

  • version – the version of the endpoint to use

  • to_json – convert the request response to a json object

Returns

TimeChimp customer requests response object