Skip to content

Commit

Permalink
Merge pull request #47 from marcelbarbulescu/fix/update-models
Browse files Browse the repository at this point in the history
Fix/update models: make homePhone optional, add Class type, add Telemetry rowData
  • Loading branch information
NodeJSmith authored Sep 23, 2024
2 parents dca15b3 + 7568833 commit 6fbeb5e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/otf_api/models/responses/member_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class MemberDetail(OtfItemBase):
state: None
postal_code: None = Field(..., alias="postalCode")
phone_number: str = Field(..., alias="phoneNumber")
home_phone: str = Field(..., alias="homePhone")
home_phone: str | None = Field(..., alias="homePhone")
work_phone: None = Field(..., alias="workPhone")
phone_type: None = Field(..., alias="phoneType")
birth_day: date | str = Field(..., alias="birthDay")
Expand Down
1 change: 1 addition & 0 deletions src/otf_api/models/responses/performance_summary_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Class(OtfItemBase):
ot_base_class_uuid: str | None = None
starts_at_local: str
name: str | None = None
type: str | None = None
coach: Coach
studio: Studio

Expand Down
9 changes: 9 additions & 0 deletions src/otf_api/models/responses/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ class TreadData(OtfItemBase):
agg_tread_distance: int = Field(..., alias="aggTreadDistance")


class RowData(OtfItemBase):
row_speed: float = Field(..., alias="rowSpeed")
row_pps: float = Field(..., alias="rowPps")
row_Spm: float = Field(..., alias="rowSpm")
agg_row_distance: int = Field(..., alias="aggRowDistance")
row_pace: int = Field(..., alias="rowPace")


class TelemetryItem(OtfItemBase):
relative_timestamp: int = Field(..., alias="relativeTimestamp")
hr: int
Expand All @@ -36,6 +44,7 @@ class TelemetryItem(OtfItemBase):
description="The timestamp of the telemetry item, calculated from the class start time and relative timestamp.",
)
tread_data: TreadData | None = Field(None, alias="treadData")
row_data: RowData | None = Field(None, alias="rowData")


class Telemetry(OtfItemBase):
Expand Down

0 comments on commit 6fbeb5e

Please sign in to comment.