Otf (Main Client)
Otf ¶
The main OTF API client.
This class handles serialization and enrichment of data from the OTF API. The actual requests to the OTF API are handled by separate client classes. This class provides methods to get bookings, classes, member details, and more. It also provides methods to book and cancel classes, get member stats, and manage favorite studios.
It is designed to be used with an authenticated user, which can be provided as an OtfUser object. If no user is provided, the OtfClient class will attempt to use cached credentials, environment variables, or prompt the user for credentials.
member_uuid
property
¶
member_uuid
Get the member UUID.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The authenticated member's UUID. |
member
property
¶
member
Get the member details.
This will lazily load the member details if they have not been loaded yet.
home_studio
property
¶
home_studio
Get the home studio details.
Returns:
| Name | Type | Description |
|---|---|---|
StudioDetail |
StudioDetail
|
The member's home studio details. |
home_studio_uuid
property
¶
home_studio_uuid
Get the home studio UUID.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The UUID of the member's home studio. |
refresh_member ¶
refresh_member()
Refresh the member details.
This will reload the member details from the OTF API.
Returns:
| Name | Type | Description |
|---|---|---|
MemberDetail |
MemberDetail
|
The refreshed member details. |