otf-api 0.15.0__py3-none-any.whl → 0.15.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
otf_api/__init__.py CHANGED
@@ -36,7 +36,7 @@ def _setup_logging() -> None:
36
36
 
37
37
  _setup_logging()
38
38
 
39
- __version__ = "0.15.0"
39
+ __version__ = "0.15.1"
40
40
 
41
41
 
42
42
  __all__ = ["Otf", "OtfUser", "models"]
@@ -59,16 +59,17 @@ class Telemetry(OtfItemBase):
59
59
  )
60
60
  class_start_time: datetime | None = Field(None, validation_alias="classStartTime")
61
61
  max_hr: int | None = Field(None, validation_alias="maxHr")
62
- zones: Zones
62
+ zones: Zones | None = Field(default=None, description="The zones associated with the telemetry.")
63
63
  window_size: int | None = Field(None, validation_alias="windowSize")
64
64
  telemetry: list[TelemetryItem] = Field(default_factory=list)
65
65
 
66
66
  def __init__(self, **data: dict[str, Any]):
67
67
  super().__init__(**data)
68
- for telem in self.telemetry:
69
- if self.class_start_time is None:
70
- continue
71
68
 
69
+ if self.class_start_time is None:
70
+ return
71
+
72
+ for telem in self.telemetry:
72
73
  telem.timestamp = self.class_start_time + timedelta(seconds=telem.relative_timestamp)
73
74
 
74
75
  @field_serializer("telemetry", when_used="json")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: otf-api
3
- Version: 0.15.0
3
+ Version: 0.15.1
4
4
  Summary: Python OrangeTheory Fitness API Client
5
5
  Author-email: Jessica Smith <j.smith.git1@gmail.com>
6
6
  License-Expression: MIT
@@ -1,4 +1,4 @@
1
- otf_api/__init__.py,sha256=FR7yg0cjQQk90XENYytSvoV183R6Qhua7m-no3FBMXM,1150
1
+ otf_api/__init__.py,sha256=tw9mkFbUa2Q9ENSsklfwn6kvc2-2YhXobVulTAw9F08,1150
2
2
  otf_api/cache.py,sha256=7cOCZT9aabGyq3YeGFjHJBay76zkLZJahRxqafASdso,4540
3
3
  otf_api/exceptions.py,sha256=74V9bVKHj8VXn7uTBf7CNj1i6Yxn4gN4AZXSQkYw6EQ,2056
4
4
  otf_api/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -50,10 +50,10 @@ otf_api/models/workouts/enums.py,sha256=El_H3l6XLxO27Xo23YheR6LPvIjfTUaeK0rBpQvR
50
50
  otf_api/models/workouts/lifetime_stats.py,sha256=WBDqdcJ4Bz2YXg1WOijeJgs7LKcix_JgZ5lkwsOpGiI,3819
51
51
  otf_api/models/workouts/out_of_studio_workout_history.py,sha256=-BKp-MnIp_5-U2KWy6nv58H6flgcbdOGsSbz5cHq20w,1945
52
52
  otf_api/models/workouts/performance_summary.py,sha256=R1p-g1L4XWWEiBYaGtX5JFvoS3Z6bzQrsPIfTQHDqyM,3464
53
- otf_api/models/workouts/telemetry.py,sha256=rKsmLbsOVUxUXH439zxxIEWYGTohKNemqrtMamAl5cA,3465
53
+ otf_api/models/workouts/telemetry.py,sha256=q1JwrUUsUF1s8aoYUwelEiWQEJCbkgWApN138AntSNc,3541
54
54
  otf_api/models/workouts/workout.py,sha256=_KIR9fLI4LgUlS02Q5SNauHd4aOqJI9H4uaFKf-xJOU,4580
55
- otf_api-0.15.0.dist-info/licenses/LICENSE,sha256=UaPT9ynYigC3nX8n22_rC37n-qmTRKLFaHrtUwF9ktE,1071
56
- otf_api-0.15.0.dist-info/METADATA,sha256=GQpa2rhYOty6jjXWOVfSSI2Q8dBDFqzDDUmdOAwPT4A,2162
57
- otf_api-0.15.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
58
- otf_api-0.15.0.dist-info/top_level.txt,sha256=KAhYg1X2YG0LkTuVRhUV1I_AReNZUVNdEan7cp0pEE4,8
59
- otf_api-0.15.0.dist-info/RECORD,,
55
+ otf_api-0.15.1.dist-info/licenses/LICENSE,sha256=UaPT9ynYigC3nX8n22_rC37n-qmTRKLFaHrtUwF9ktE,1071
56
+ otf_api-0.15.1.dist-info/METADATA,sha256=7kPdRLRp09htlR8Xi7B33v4xUQ6OyU8YB42Zkdnvwjg,2162
57
+ otf_api-0.15.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
58
+ otf_api-0.15.1.dist-info/top_level.txt,sha256=KAhYg1X2YG0LkTuVRhUV1I_AReNZUVNdEan7cp0pEE4,8
59
+ otf_api-0.15.1.dist-info/RECORD,,