This commit is contained in:
2025-05-15 13:44:09 +03:00
parent 0294c3d540
commit da7ae0a370
6 changed files with 185 additions and 27 deletions

View File

@@ -11,14 +11,25 @@ class Config(BaseSettings):
class RedmineConfig(BaseSettings):
BASE_API_URL: str = "https://redmine.sbps.ru"
class RedmineConfig:
@property
def base_url(self):
return "https://redmine.sbps.ru"
TIME_ENTRIES: str = "/time_entries.json"
@property
def time_entries_url(self):
return "/time_entries.json"
@property
def my_account_url(self):
return "/my/account.json"
@property
def datetime_format(self):
return "%Y-%m-%d"
class ClockifyConfig(BaseSettings):
class ClockifyConfig:
@property
def base_url(self):
return "https://api.clockify.me/api/v1"
@@ -34,6 +45,10 @@ class ClockifyConfig(BaseSettings):
@property
def user_url(self):
return "/user"
@property
def datetime_format(self):
return "%Y-%m-%dT%H:%M:%SZ"
config = Config()