123
This commit is contained in:
25
config.py
25
config.py
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user