Client
toggl_api.modules.client.ClientBody
dataclass
¶
JSON body dataclass for PUT, POST & PATCH requests.
name: Optional[str] = field(default=None)
class-attribute
instance-attribute
¶
Name of the project. Defaults to None. Will be required if its a POST request.
format_body(workspace_id: int) -> dict[str, Any]
¶
Formats the body for JSON requests.
Gets called by the endpoint methods before requesting.
Parameters:
-
workspace_id
(int
) –Alternate Workspace ID for the request if the body does not contain a workspace_id.
Returns:
-
dict[str, Any]
–dict[str, Any]: JSON compatible formatted body.
toggl_api.modules.client.ClientEndpoint
¶
Bases: TogglCachedEndpoint