timechimp.api.time package
Module contents
- timechimp.api.time.change_status_external(registration_ids: List[int], approval_status: timechimp.enum.ApprovalStatus, message: str, name: str, version: str = '1', to_json: bool = False) Union[requests.models.Response, dict]
Change the external submitted registration ids approval status
- Parameters
registration_ids – the list of registration ids
approval_status – ApprovalStatus.APPROVED or ApprovalStatus.REJECTED
message – the message the current submission
name – the name of the reviewer
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.change_status_internal(registration_ids: List[int], approval_status: timechimp.enum.ApprovalStatus, message: str, version: str = '1', to_json: bool = False) Union[requests.models.Response, dict]
Change the internal submitted registration ids approval status
- Parameters
registration_ids – the list of registration ids
approval_status – ApprovalStatus.APPROVED or ApprovalStatus.REJECTED
message – the message the current submission
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.create(time: dict, version: str = '1', to_json: bool = False) Union[requests.models.Response, dict]
Create a new time entry
- Parameters
time – the JSON representation of the time entry to create
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.delete(time_id: int, version: str = '1', to_json: bool = False) Union[requests.models.Response, dict]
Delete a time entry by id
- Parameters
time_id – the JSON representation of the time entry to create
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.get_all(version: str = '1', to_json: bool = False) Union[requests.models.Response, List[dict]]
Get all the time entries
- Parameters
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.get_by_date_range(date_from: str, date_to: str, version: str = '1', to_json: bool = False) Union[requests.models.Response, List[dict]]
Get time entries by date range
- Parameters
date_from – inclusive date as YYYY-MM-DD
date_to – inclusive date as YYYY-MM-DD
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.get_by_id(time_id: int, version: str = '1', to_json: bool = False) Union[requests.models.Response, dict]
Get a time entry by id
- Parameters
time_id – the unique id of the time entry
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.get_by_project(project_id: int, version: str = '1', to_json: bool = False) Union[requests.models.Response, List[dict]]
Get a time entry by project
- Parameters
project_id – the unique id of the project
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.get_by_project_by_timerange(project_id: int, date_from: str, date_to: str, version: str = '1', to_json: bool = False) Union[requests.models.Response, List[dict]]
Get time entries by project and by time range
- Parameters
project_id – the unique id of the project
date_from – inclusive date as YYYY-MM-DD
date_to – inclusive date as YYYY-MM-DD
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.get_status_history(time_id: int, version: str = '1', to_json: bool = False) Union[requests.models.Response, List[dict]]
Get a time entry’s status history
- Parameters
time_id – the unique id of the time entry
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.start_timer(timer_id: int, version: str = '1', to_json: bool = False) Union[requests.models.Response, str]
Start a new timer
- Parameters
timer_id – the id of the started timer
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.stop_timer(timer_id: int, version: str = '1', to_json: bool = False) Union[requests.models.Response, int]
Stop a timer to to get the number of elapsed hours
- Parameters
timer_id – the id of the timer to stop
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.submit_for_approval_external(registration_ids: List[int], contact_person_emails: List[str], message: str, version: str = '1', to_json: bool = False) Union[requests.models.Response, dict]
Submit registration ids for internal approval
- Parameters
registration_ids – the list of registration ids
contact_person_emails – a list of contact emails
message – the message the current submission
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.submit_for_approval_internal(registration_ids: List[int], message: str, version: str = '1', to_json: bool = False) Union[requests.models.Response, List[dict]]
Submit registration ids for internal approval
- Parameters
registration_ids – the list of registration ids
message – the message the current submission
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object
- timechimp.api.time.update(time: dict, version: str = '1', to_json: bool = False) Union[requests.models.Response, dict]
Update a time entry
- Parameters
time – the JSON representation of the time entry to update
version – the version of the endpoint to use
to_json – convert the request response to a json object
- Returns
TimeChimp time requests response object