mirror of
https://github.com/ShayManor/github-readme-stats.git
synced 2026-12-02 11:53:48 +05:30
feat(streaks): add StreakData model
This commit is contained in:
@@ -8,6 +8,7 @@ from .types import (
|
|||||||
FocusCategory,
|
FocusCategory,
|
||||||
LanguageData,
|
LanguageData,
|
||||||
AchievementData,
|
AchievementData,
|
||||||
|
StreakData,
|
||||||
)
|
)
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
@@ -18,4 +19,5 @@ __all__ = [
|
|||||||
"FocusCategory",
|
"FocusCategory",
|
||||||
"LanguageData",
|
"LanguageData",
|
||||||
"AchievementData",
|
"AchievementData",
|
||||||
|
"StreakData",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -56,3 +56,13 @@ class AchievementData:
|
|||||||
subtitle: str = ""
|
subtitle: str = ""
|
||||||
event_date: str = ""
|
event_date: str = ""
|
||||||
icon: str = "trophy" # trophy, medal, star, hackathon
|
icon: str = "trophy" # trophy, medal, star, hackathon
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class StreakData:
|
||||||
|
current: int = 0 # consecutive days ending today (or yesterday under grace)
|
||||||
|
max: int = 0 # all-time longest observed streak
|
||||||
|
current_start: str = "" # ISO date the current streak started, "" if current == 0
|
||||||
|
last_active_date: str = "" # most recent date with contributions in the window
|
||||||
|
max_start: str = "" # ISO date the max streak started (best-effort)
|
||||||
|
max_end: str = "" # ISO date the max streak ended (best-effort)
|
||||||
|
|||||||
Reference in New Issue
Block a user