otf-api 0.2.2__tar.gz → 0.3.0__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.
- otf_api-0.3.0/PKG-INFO +55 -0
- otf_api-0.3.0/README.md +20 -0
- {otf_api-0.2.2 → otf_api-0.3.0}/pyproject.toml +14 -1
- otf_api-0.3.0/src/otf_api/__init__.py +15 -0
- otf_api-0.3.0/src/otf_api/api.py +901 -0
- otf_api-0.3.0/src/otf_api/cli/__init__.py +4 -0
- otf_api-0.3.0/src/otf_api/cli/_utilities.py +60 -0
- otf_api-0.3.0/src/otf_api/cli/app.py +177 -0
- otf_api-0.3.0/src/otf_api/cli/bookings.py +231 -0
- otf_api-0.3.0/src/otf_api/cli/prompts.py +162 -0
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/__init__.py +4 -8
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/auth.py +18 -12
- otf_api-0.3.0/src/otf_api/models/base.py +210 -0
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/__init__.py +6 -14
- otf_api-0.3.0/src/otf_api/models/responses/body_composition_list.py +304 -0
- otf_api-0.3.0/src/otf_api/models/responses/book_class.py +405 -0
- otf_api-0.3.0/src/otf_api/models/responses/bookings.py +304 -0
- otf_api-0.3.0/src/otf_api/models/responses/cancel_booking.py +93 -0
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/challenge_tracker_content.py +6 -6
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/challenge_tracker_detail.py +6 -6
- otf_api-0.3.0/src/otf_api/models/responses/classes.py +255 -0
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/enums.py +0 -35
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/favorite_studios.py +5 -5
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/latest_agreement.py +2 -2
- otf_api-0.3.0/src/otf_api/models/responses/lifetime_stats.py +92 -0
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/member_detail.py +17 -12
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/member_membership.py +2 -2
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/member_purchases.py +9 -9
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/out_of_studio_workout_history.py +4 -4
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/performance_summary_detail.py +1 -1
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/performance_summary_list.py +13 -13
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/studio_detail.py +10 -10
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/studio_services.py +8 -8
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/telemetry.py +6 -6
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/telemetry_hr_history.py +6 -6
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/telemetry_max_hr.py +3 -3
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/total_classes.py +2 -2
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/models/responses/workouts.py +4 -4
- otf_api-0.2.2/PKG-INFO +0 -284
- otf_api-0.2.2/README.md +0 -256
- otf_api-0.2.2/src/otf_api/__init__.py +0 -70
- otf_api-0.2.2/src/otf_api/__version__.py +0 -1
- otf_api-0.2.2/src/otf_api/api.py +0 -143
- otf_api-0.2.2/src/otf_api/classes_api.py +0 -44
- otf_api-0.2.2/src/otf_api/member_api.py +0 -380
- otf_api-0.2.2/src/otf_api/models/base.py +0 -7
- otf_api-0.2.2/src/otf_api/models/responses/bookings.py +0 -130
- otf_api-0.2.2/src/otf_api/models/responses/classes.py +0 -57
- otf_api-0.2.2/src/otf_api/performance_api.py +0 -54
- otf_api-0.2.2/src/otf_api/studios_api.py +0 -96
- otf_api-0.2.2/src/otf_api/telemetry_api.py +0 -95
- {otf_api-0.2.2 → otf_api-0.3.0}/AUTHORS.md +0 -0
- {otf_api-0.2.2 → otf_api-0.3.0}/LICENSE +0 -0
- {otf_api-0.2.2 → otf_api-0.3.0}/src/otf_api/py.typed +0 -0
otf_api-0.3.0/PKG-INFO
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: otf-api
|
3
|
+
Version: 0.3.0
|
4
|
+
Summary: Python OrangeTheory Fitness API Client
|
5
|
+
License: MIT
|
6
|
+
Author: Jessica Smith
|
7
|
+
Author-email: j.smith.git1@gmail.com
|
8
|
+
Requires-Python: >=3.10,<4.0
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
10
|
+
Classifier: Intended Audience :: Developers
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
12
|
+
Classifier: Operating System :: OS Independent
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
17
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
18
|
+
Classifier: Topic :: Software Development :: Libraries
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
21
|
+
Requires-Dist: aiohttp (==3.9.5)
|
22
|
+
Requires-Dist: humanize (>=4.9.0,<5.0.0)
|
23
|
+
Requires-Dist: inflection (==0.5.*)
|
24
|
+
Requires-Dist: loguru (==0.7.2)
|
25
|
+
Requires-Dist: pendulum[cli] (>=3.0.0,<4.0.0)
|
26
|
+
Requires-Dist: pint (==0.24.*)
|
27
|
+
Requires-Dist: pycognito (==2024.5.1)
|
28
|
+
Requires-Dist: pydantic (==2.7.3)
|
29
|
+
Requires-Dist: python-box (>=7.2.0,<8.0.0)
|
30
|
+
Requires-Dist: readchar[cli] (>=4.1.0,<5.0.0)
|
31
|
+
Requires-Dist: typer[cli] (>=0.12.3,<0.13.0)
|
32
|
+
Project-URL: Documentation, https://otf-api.readthedocs.io/en/stable/
|
33
|
+
Description-Content-Type: text/markdown
|
34
|
+
|
35
|
+
Simple API client for interacting with the OrangeTheory Fitness APIs.
|
36
|
+
|
37
|
+
|
38
|
+
This library allows access to the OrangeTheory API to retrieve workouts and performance data, class schedules, studio information, and bookings. It is a work in progress, currently only allowing access to GET calls, but my goal is to expand it to include POST, PUT, and DELETE calls as well.
|
39
|
+
|
40
|
+
## Installation
|
41
|
+
```bash
|
42
|
+
pip install otf-api
|
43
|
+
```
|
44
|
+
|
45
|
+
## Overview
|
46
|
+
|
47
|
+
To use the API, you need to create an instance of the `Api` class, providing your email address and password. This will authenticate you with the API and allow you to make requests. When the `Api` object is created it automatically grabs your member details and home studio, to simplify the process of making requests.
|
48
|
+
|
49
|
+
|
50
|
+
See the [examples](./examples) for more information on how to use the API.
|
51
|
+
|
52
|
+
|
53
|
+
Disclaimer:
|
54
|
+
This project is in no way affiliated with OrangeTheory Fitness.
|
55
|
+
|
otf_api-0.3.0/README.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Simple API client for interacting with the OrangeTheory Fitness APIs.
|
2
|
+
|
3
|
+
|
4
|
+
This library allows access to the OrangeTheory API to retrieve workouts and performance data, class schedules, studio information, and bookings. It is a work in progress, currently only allowing access to GET calls, but my goal is to expand it to include POST, PUT, and DELETE calls as well.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
```bash
|
8
|
+
pip install otf-api
|
9
|
+
```
|
10
|
+
|
11
|
+
## Overview
|
12
|
+
|
13
|
+
To use the API, you need to create an instance of the `Api` class, providing your email address and password. This will authenticate you with the API and allow you to make requests. When the `Api` object is created it automatically grabs your member details and home studio, to simplify the process of making requests.
|
14
|
+
|
15
|
+
|
16
|
+
See the [examples](./examples) for more information on how to use the API.
|
17
|
+
|
18
|
+
|
19
|
+
Disclaimer:
|
20
|
+
This project is in no way affiliated with OrangeTheory Fitness.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "otf-api"
|
3
|
-
version = "0.
|
3
|
+
version = "0.3.0"
|
4
4
|
description = "Python OrangeTheory Fitness API Client"
|
5
5
|
authors = ["Jessica Smith <j.smith.git1@gmail.com>"]
|
6
6
|
license = "MIT"
|
@@ -26,8 +26,15 @@ aiohttp = "3.9.5"
|
|
26
26
|
loguru = "0.7.2"
|
27
27
|
pydantic = "2.7.3"
|
28
28
|
pycognito = "2024.5.1"
|
29
|
+
typer = { version = "^0.12.3", extras = ["cli"] }
|
30
|
+
pendulum = { version = "^3.0.0", extras = ["cli"] }
|
29
31
|
|
30
32
|
|
33
|
+
readchar = { version = "^4.1.0", extras = ["cli"] }
|
34
|
+
humanize = "^4.9.0"
|
35
|
+
python-box = "^7.2.0"
|
36
|
+
inflection = "0.5.*"
|
37
|
+
pint = "0.24.*"
|
31
38
|
[tool.poetry.group.dev.dependencies]
|
32
39
|
pytest = "8.2.2"
|
33
40
|
pytest-loguru = "0.4.0"
|
@@ -63,9 +70,15 @@ setuptools = "^70.0.0"
|
|
63
70
|
pkginfo = "^1.11.1"
|
64
71
|
virtualenv = "^20.26.2"
|
65
72
|
|
73
|
+
|
74
|
+
[tool.poetry.group.cli.dependencies]
|
75
|
+
|
66
76
|
[build-system]
|
67
77
|
requires = ["poetry-core"]
|
68
78
|
build-backend = "poetry.core.masonry.api"
|
69
79
|
|
70
80
|
[tool.pytest.ini_options]
|
71
81
|
pythonpath = ["src"]
|
82
|
+
|
83
|
+
[tool.poetry.scripts]
|
84
|
+
otf = "otf_api.cli:base_app"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import os
|
2
|
+
import sys
|
3
|
+
|
4
|
+
from loguru import logger
|
5
|
+
|
6
|
+
from .api import Api
|
7
|
+
from .models.auth import User
|
8
|
+
|
9
|
+
__version__ = "0.3.0"
|
10
|
+
|
11
|
+
|
12
|
+
__all__ = ["Api", "User"]
|
13
|
+
|
14
|
+
logger.remove()
|
15
|
+
logger.add(sink=sys.stdout, level=os.getenv("OTF_LOG_LEVEL", "INFO"))
|