Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hydration #61

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions garth/stats/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
__all__ = [
"DailyHRV",
"DailyHydration",
matin marked this conversation as resolved.
Show resolved Hide resolved
"DailyIntensityMinutes",
"DailySleep",
"DailySteps",
Expand Down
2 changes: 0 additions & 2 deletions garth/stats/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
from .. import http
from ..utils import camel_to_snake_dict, format_end_date

BASE_PATH = "/usersummary-service/stats/stress"


@dataclass(frozen=True)
class Stats:
Expand Down
16 changes: 16 additions & 0 deletions garth/stats/hydration.py
matin marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from typing import ClassVar

from pydantic.dataclasses import dataclass

from ._base import Stats

BASE_PATH = "/usersummary-service/stats/hydration"


@dataclass(frozen=True)
class DailyHydration(Stats):
value_in_ml: float
goal_in_ml: float

_path: ClassVar[str] = f"{BASE_PATH}/daily/{{start}}/{{end}}"
_page_size: ClassVar[int] = 28
Loading