diff --git a/examples/workout_examples.py b/examples/workout_examples.py index 3364c64..f796cd8 100644 --- a/examples/workout_examples.py +++ b/examples/workout_examples.py @@ -80,7 +80,7 @@ def main(): # you can get detailed information about a specific performance summary by calling `get_performance_summary` # which takes a performance_summary_id as an argument - data = otf.get_performance_summary(data_list[0].id) + data = otf.get_performance_summary(data_list[0].class_history_uuid) print(data.model_dump_json(indent=4)) """ @@ -207,7 +207,7 @@ def main(): # telemetry is a detailed record of a specific workout - minute by minute, or more granular if desired # this endpoint takes a class_history_uuid, as well as a number of max data points (default 120) - telemetry = otf.get_telemetry(performance_summary_id=data_list[1].id) + telemetry = otf.get_telemetry(performance_summary_id=data_list[1].class_history_uuid) telemetry.telemetry = telemetry.telemetry[:2] print(telemetry.model_dump_json(indent=4)) diff --git a/src/otf_api/models/performance_summary_detail.py b/src/otf_api/models/performance_summary_detail.py index f9c76ea..f7113e5 100644 --- a/src/otf_api/models/performance_summary_detail.py +++ b/src/otf_api/models/performance_summary_detail.py @@ -68,11 +68,16 @@ class Rower(BaseEquipment): class PerformanceSummaryDetail(OtfItemBase): - id: str + class_history_uuid: str = Field(..., alias="id") class_name: str | None = Field(None, alias=AliasPath("class", "name")) class_starts_at: datetime | None = Field(None, alias=AliasPath("class", "starts_at_local")) - ratable: bool | None = None + ratable: bool | None = Field( + None, + exclude=True, + repr=False, + description="Seems to be inaccurate, not reflecting ratable from `PerformanceSummaryEntry`", + ) calories_burned: int | None = Field(None, alias=AliasPath("details", "calories_burned")) splat_points: int | None = Field(None, alias=AliasPath("details", "splat_points")) step_count: int | None = Field(None, alias=AliasPath("details", "step_count")) diff --git a/src/otf_api/models/performance_summary_list.py b/src/otf_api/models/performance_summary_list.py index 34dfd04..6a17d6b 100644 --- a/src/otf_api/models/performance_summary_list.py +++ b/src/otf_api/models/performance_summary_list.py @@ -33,7 +33,7 @@ class ClassRating(OtfItemBase): class PerformanceSummaryEntry(OtfItemBase): - id: str = Field(..., alias="id") + class_history_uuid: str = Field(..., alias="id") calories_burned: int | None = Field(None, alias=AliasPath("details", "calories_burned")) splat_points: int | None = Field(None, alias=AliasPath("details", "splat_points")) step_count: int | None = Field(None, alias=AliasPath("details", "step_count"))