.
This commit is contained in:
28
config/clockify.py
Normal file
28
config/clockify.py
Normal file
@@ -0,0 +1,28 @@
|
||||
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}"
|
||||
Reference in New Issue
Block a user