Files
redmine_tracker/config/clockify.py
2025-05-19 14:23:07 +03:00

28 lines
767 B
Python

class ClockifyConfig:
def __init__(self, workspace_id: str, user_id: str):
self.workspace_id = workspace_id
self.user_id = user_id
@property
def base_url(self):
return "https://api.clockify.me/api/v1"
@property
def tags_url(self):
return f"/workspaces/{self.workspace_id}/tags"
@property
def time_entries_url(self):
return f"/workspaces/{self.workspace_id}/user/{self.user_id}/time-entries"
@property
def user_url(self):
return "/user"
@property
def datetime_format(self):
return "%Y-%m-%dT%H:%M:%SZ"
@property
def update_time_entry(self, activity_id):
return f"/workspaces/{self.workspace_id}/time-entries/{activity_id}"