otf-api 0.10.1__py3-none-any.whl → 0.10.2__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
@@ -4,7 +4,7 @@ from otf_api.api import Otf
4
4
  from otf_api import models
5
5
  from otf_api.auth import OtfUser
6
6
 
7
- __version__ = "0.10.1"
7
+ __version__ = "0.10.2"
8
8
 
9
9
 
10
10
  __all__ = ["Otf", "OtfUser", "models"]
otf_api/api.py CHANGED
@@ -67,6 +67,7 @@ class Otf:
67
67
  retry=retry_if_exception_type(exc.OtfRequestError),
68
68
  stop=stop_after_attempt(3),
69
69
  wait=wait_exponential(multiplier=1, min=4, max=10),
70
+ reraise=True,
70
71
  )
71
72
  def _do(
72
73
  self,
@@ -36,6 +36,10 @@ class OtfClass(OtfItemBase):
36
36
  program_name: str | None = Field(None, alias="programName", exclude=True, repr=False)
37
37
  virtual_class: bool | None = Field(None, alias="virtualClass", exclude=True, repr=False)
38
38
 
39
+ def __str__(self) -> str:
40
+ starts_at_str = self.starts_at.strftime("%a %b %d, %I:%M %p")
41
+ return f"Class: {starts_at_str} {self.name} - {self.coach.first_name}"
42
+
39
43
 
40
44
  class Booking(OtfItemBase):
41
45
  booking_uuid: str = Field(alias="classBookingUUId", description="ID used to cancel the booking")
otf_api/models/classes.py CHANGED
@@ -33,7 +33,9 @@ class OtfClass(OtfItemBase):
33
33
  is_home_studio: bool | None = Field(None, description="Custom helper field to determine if at home studio")
34
34
 
35
35
  # unused fields
36
- class_id: str | None = Field(None, alias="id", exclude=True, repr=False, description="Not used by API")
36
+ class_id: str | None = Field(
37
+ None, alias="id", exclude=True, repr=False, description="Matches new booking endpoint class id"
38
+ )
37
39
 
38
40
  created_at: datetime | None = Field(None, exclude=True, repr=False)
39
41
  ends_at_utc: datetime | None = Field(None, alias="ends_at", exclude=True, repr=False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: otf-api
3
- Version: 0.10.1
3
+ Version: 0.10.2
4
4
  Summary: Python OrangeTheory Fitness API Client
5
5
  License: MIT
6
6
  Author: Jessica Smith
@@ -1,5 +1,5 @@
1
- otf_api/__init__.py,sha256=jmIypN9FJ7JVYl5DU1tyUooGkPfpx-vsQ-kzOi36G1w,205
2
- otf_api/api.py,sha256=eAAkmgE7nySpHEe52O9SWv6hC3hLy1Aiy5jDz6ySoV0,60312
1
+ otf_api/__init__.py,sha256=B_mniIQTSJOh_sn2p57CXH1bN6lFiBpPuP8fqj9itQE,205
2
+ otf_api/api.py,sha256=OmEwG3Zrfq1OQ-WoiaYg1LzsAPx8nsy6ft5ZSWb2xiQ,60334
3
3
  otf_api/auth/__init__.py,sha256=Pu6ugbEXhgjJEpYKr7K2CqEac53Wq9FRF3F16GLQ_ww,133
4
4
  otf_api/auth/auth.py,sha256=m9qzUn0hdAo6AZHm2Mn054nLqUWPxEyP3y3DOBVkvYA,9010
5
5
  otf_api/auth/user.py,sha256=HgggfneeVMnKFWSUMnlikfZyC__HE8vVaKSpBS4_sIg,2256
@@ -10,10 +10,10 @@ otf_api/logging.py,sha256=PRZpCaJ1F1Xya3L9Efkt3mKS5_QNr3sXjEUERSxYjvE,563
10
10
  otf_api/models/__init__.py,sha256=Ak1Wph5Yn9Npu3m3vvG-n5CsMH6j7NCuzoOBd0b_OlI,1524
11
11
  otf_api/models/base.py,sha256=KJlIxl_sRj6f-g5vKYPw4yV6fGDk-fwZ93EO0JGPYMw,202
12
12
  otf_api/models/body_composition_list.py,sha256=jGdR-9ScvIOtULJNB99aYh2INk2ihoHAnTWtbQCIea4,12202
13
- otf_api/models/bookings.py,sha256=8zgLnQ40ci0c7AimGeoAI-Raw8d2byvKoXkJXyW1xUE,4260
13
+ otf_api/models/bookings.py,sha256=Lj-IHN1k-w4vF-5aIKbsiQ6Uq-I5_ELoPUKXPGkfbgM,4440
14
14
  otf_api/models/challenge_tracker_content.py,sha256=zukbda38DloiBHW9HUEKQnumGhgVqpjjbxo7G4bDIc0,2630
15
15
  otf_api/models/challenge_tracker_detail.py,sha256=KDfLRDjr8quVhDPVj9x_tuLnkJPua5y8C3WtGIVzXZw,4356
16
- otf_api/models/classes.py,sha256=DZ7oo_MNK7m3ul2gK929maGBksekG9RtLzYa-Di8skk,3005
16
+ otf_api/models/classes.py,sha256=TIbFL-haguBqYSSLUEBzPAdv2B-zHNUvcmxcTSu0o6c,3041
17
17
  otf_api/models/enums.py,sha256=VyG3w-kcpDMTsHvX7s6xp-cI61mqvsmN_A76jsnmKj0,4604
18
18
  otf_api/models/lifetime_stats.py,sha256=sQw0oaT5uSlCTZyMSEEhYJg7IdOzuxelTI3mzDBHNls,3055
19
19
  otf_api/models/member_detail.py,sha256=CDDZg3Ow07U57yRqbm3i-BVha0cvCNOZ8QhN0pliU_A,6598
@@ -28,7 +28,7 @@ otf_api/models/studio_services.py,sha256=aGLQMQmjGVpI6YxzAl-mcp3Y9cHPXuH9dIqrl6E
28
28
  otf_api/models/telemetry.py,sha256=LuoQ-W7wWQ-trjQqfITQsUpkWL1X3TXdsHiDhyIDvUk,2748
29
29
  otf_api/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
30
  otf_api/utils.py,sha256=-9JBjRmoS6xpua_lHccJYjEX2tWp2-5QQrbbuOYMyIo,3945
31
- otf_api-0.10.1.dist-info/LICENSE,sha256=UaPT9ynYigC3nX8n22_rC37n-qmTRKLFaHrtUwF9ktE,1071
32
- otf_api-0.10.1.dist-info/METADATA,sha256=vOdLR2wtWuJGfjPCKnvjLzqziKPZvnh1DJKR47-QGsI,2375
33
- otf_api-0.10.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
34
- otf_api-0.10.1.dist-info/RECORD,,
31
+ otf_api-0.10.2.dist-info/LICENSE,sha256=UaPT9ynYigC3nX8n22_rC37n-qmTRKLFaHrtUwF9ktE,1071
32
+ otf_api-0.10.2.dist-info/METADATA,sha256=ZAojA_OhEwYb2vHLBDErKWzKgpOXmgbYvQ5TL1PHgt8,2375
33
+ otf_api-0.10.2.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
34
+ otf_api-0.10.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.1
2
+ Generator: poetry-core 2.1.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any