otf-api 0.10.1__tar.gz → 0.10.2__tar.gz

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.
Files changed (34) hide show
  1. {otf_api-0.10.1 → otf_api-0.10.2}/PKG-INFO +1 -1
  2. {otf_api-0.10.1 → otf_api-0.10.2}/pyproject.toml +1 -1
  3. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/__init__.py +1 -1
  4. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/api.py +1 -0
  5. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/bookings.py +4 -0
  6. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/classes.py +3 -1
  7. {otf_api-0.10.1 → otf_api-0.10.2}/LICENSE +0 -0
  8. {otf_api-0.10.1 → otf_api-0.10.2}/README.md +0 -0
  9. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/auth/__init__.py +0 -0
  10. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/auth/auth.py +0 -0
  11. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/auth/user.py +0 -0
  12. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/auth/utils.py +0 -0
  13. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/exceptions.py +0 -0
  14. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/filters.py +0 -0
  15. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/logging.py +0 -0
  16. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/__init__.py +0 -0
  17. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/base.py +0 -0
  18. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/body_composition_list.py +0 -0
  19. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/challenge_tracker_content.py +0 -0
  20. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/challenge_tracker_detail.py +0 -0
  21. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/enums.py +0 -0
  22. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/lifetime_stats.py +0 -0
  23. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/member_detail.py +0 -0
  24. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/member_membership.py +0 -0
  25. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/member_purchases.py +0 -0
  26. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/mixins.py +0 -0
  27. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/notifications.py +0 -0
  28. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/out_of_studio_workout_history.py +0 -0
  29. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/performance_summary.py +0 -0
  30. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/studio_detail.py +0 -0
  31. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/studio_services.py +0 -0
  32. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/models/telemetry.py +0 -0
  33. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/py.typed +0 -0
  34. {otf_api-0.10.1 → otf_api-0.10.2}/src/otf_api/utils.py +0 -0
@@ -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,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "otf-api"
3
- version = "0.10.1"
3
+ version = "0.10.2"
4
4
  description = "Python OrangeTheory Fitness API Client"
5
5
  authors = ["Jessica Smith <j.smith.git1@gmail.com>"]
6
6
  license = "MIT"
@@ -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"]
@@ -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")
@@ -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)
File without changes
File without changes
File without changes
File without changes