intervalsicu.api.intervals¶
Module Contents¶
Classes¶
This is the API class that applications interact with. |
-
class
intervalsicu.api.intervals.Intervals(athlete_id, api_key, session=None)¶ This is the API class that applications interact with. Pass your athlete_id and api_key, and then make calls.
-
activities(self)¶ Returns all your activities formatted in CSV
- Returns
Text data in CSV format
- Return type
str
-
activity(self, activity_id)¶ Returns an
Activityby ID- Parameters
activity_id (int) – Activity id number
- Returns
Activity Object
- Return type
Activity
-
events(self, start_date, end_date)¶ Returns a list of
Eventobjects over a range of dates. A single date will return an object for that day.- Parameters
start_date (datetime.date) – Starting date
end_date (datetime.date) – End date
- Returns
List of Event objects
- Return type
[
Event]
-
folders(self)¶ Retrieve a list of workout folders
- Returns
List of Folder objects
- Return type
[
Folder]
-
wellness(self, start_date, end_date=None)¶ Wellness by date, or range of dates. A single date will return a wellness object for that day. Specifying two dates (start and end) will return all wellness objects within the range.
- Parameters
start_date (datetime.date) – Starting date (or single date)
end_date (datetime.date) – End date (or omit if only requesting a single date)
- Returns
List of Wellness objects
- Return type
[
Wellness]
-
wellness_put(self, wellness)¶ Update a wellness object.
- Parameters
wellness (
Wellness) –Wellnessobject- Returns
The updated
Wellnessobject- Return type
Wellness
-
workouts(self)¶ Return a list of all
Workoutobjects- Returns
List of
Workoutobjects- Return type
[
Workout]
-
workout(self, workout_id)¶ Return a single
Workoutby ID- Parameters
workout_id (int) – Id of workout
- Returns
Workoutobject- Return type
Workout
-