Добавил новый датакласс для Деятельности трудочасов и настроил их динамическую подгрузку из Redmine

This commit is contained in:
2025-05-21 12:22:48 +03:00
parent aae6d8309a
commit 70232f15a0
8 changed files with 39 additions and 24 deletions

View File

@@ -6,7 +6,7 @@ import requests
from tqdm import tqdm
from config import ClockifyConfig, config
from classes import Activity, Tag
from classes import Activity, ActivityType, Tag
from exceptions import InvalidToken
from utils import time_to_hour
@@ -106,9 +106,7 @@ class ClockifyAPI(ClockifyConfig):
except Exception as e:
logger.error(e)
return
def _check_token(self, token: str) -> str:
resp = requests.get(self.base_url + self.user_url, headers={"X-API-KEY": token})
if not resp.ok: