public interface AthleteService extends StravaService
| Modifier and Type | Method and Description |
|---|---|
StravaAthlete |
getAthlete(Integer athleteId)
This request is used to retrieve information about any
athlete on Strava. |
CompletableFuture<StravaAthlete> |
getAthleteAsync(Integer athleteId)
This request is used to retrieve information about any
athlete on Strava. |
StravaAthlete |
getAuthenticatedAthlete()
This request is used to retrieve information about the currently authenticated
athlete. |
CompletableFuture<StravaAthlete> |
getAuthenticatedAthleteAsync()
This request is used to retrieve information about the currently authenticated
athlete. |
StravaAthleteZones |
getAuthenticatedAthleteZones()
Returns the current athlete’s heart rate zones.
|
CompletableFuture<StravaAthleteZones> |
getAuthenticatedAthleteZonesAsync()
Returns the current athlete’s heart rate zones.
|
List<StravaAthlete> |
listAllAthleteFriends(Integer athleteId)
Convenience method for returning ALL of an athlete's friends
|
CompletableFuture<List<StravaAthlete>> |
listAllAthleteFriendsAsync(Integer athleteId)
Convenience method for returning ALL of an athlete's friends
|
List<StravaSegmentEffort> |
listAllAthleteKOMs(Integer athleteId)
Convenience method for returning ALL of an athlete's KOM's
|
CompletableFuture<List<StravaSegmentEffort>> |
listAllAthleteKOMsAsync(Integer athleteId)
Convenience method for returning ALL of an athlete's KOM's
|
List<StravaAthlete> |
listAllAthletesBothFollowing(Integer athleteId)
Convenience method for returning ALL of the athletes that both the authenticated athlete and the given athlete are following
|
CompletableFuture<List<StravaAthlete>> |
listAllAthletesBothFollowingAsync(Integer athleteId)
Convenience method for returning ALL of the athletes that both the authenticated athlete and the given athlete are following
|
List<StravaAthlete> |
listAllAuthenticatedAthleteFriends()
Convenience method for returning ALL of the authenticated athlete's friends
|
CompletableFuture<List<StravaAthlete>> |
listAllAuthenticatedAthleteFriendsAsync()
Convenience method for returning ALL of the authenticated athlete's friends
|
List<StravaAthlete> |
listAthleteFriends(Integer athleteId)
Friends are users an
athlete is following. |
List<StravaAthlete> |
listAthleteFriends(Integer athleteId,
Paging pagingInstruction)
Friends are users an
athlete is following. |
CompletableFuture<List<StravaAthlete>> |
listAthleteFriendsAsync(Integer athleteId)
Friends are users an
athlete is following. |
CompletableFuture<List<StravaAthlete>> |
listAthleteFriendsAsync(Integer athleteId,
Paging pagingInstruction)
Friends are users an
athlete is following. |
List<StravaSegmentEffort> |
listAthleteKOMs(Integer athleteId)
Returns an array of
segment efforts representing KOMs/QOMs and course records held by the given athlete. |
List<StravaSegmentEffort> |
listAthleteKOMs(Integer athleteId,
Paging pagingInstruction)
Returns an array of
segment efforts representing KOMs/QOMs and course records held by the given athlete. |
CompletableFuture<List<StravaSegmentEffort>> |
listAthleteKOMsAsync(Integer athleteId)
Returns an array of
segment efforts representing KOMs/QOMs and course records held by the given athlete. |
CompletableFuture<List<StravaSegmentEffort>> |
listAthleteKOMsAsync(Integer athleteId,
Paging pagingInstruction)
Returns an array of
segment efforts representing KOMs/QOMs and course records held by the given athlete. |
List<StravaAthlete> |
listAthletesBothFollowing(Integer athleteId)
Retrieve the
athletes who both the authenticated athlete and the indicated athlete are following. |
List<StravaAthlete> |
listAthletesBothFollowing(Integer athleteId,
Paging pagingInstruction)
Retrieve the
athletes who both the authenticated athlete and the indicated athlete are following. |
CompletableFuture<List<StravaAthlete>> |
listAthletesBothFollowingAsync(Integer athleteId)
Retrieve the
athletes who both the authenticated athlete and the indicated athlete are following. |
CompletableFuture<List<StravaAthlete>> |
listAthletesBothFollowingAsync(Integer athleteId,
Paging pagingInstruction)
Retrieve the
athletes who both the authenticated athlete and the indicated athlete are following. |
List<StravaAthlete> |
listAuthenticatedAthleteFriends()
Friends are users the current
athlete is following. |
List<StravaAthlete> |
listAuthenticatedAthleteFriends(Paging pagingInstruction)
Friends are users the current
athlete is following. |
CompletableFuture<List<StravaAthlete>> |
listAuthenticatedAthleteFriendsAsync()
Friends are users the current
athlete is following. |
CompletableFuture<List<StravaAthlete>> |
listAuthenticatedAthleteFriendsAsync(Paging pagingInstruction)
Friends are users the current
athlete is following. |
StravaStatistics |
statistics(Integer athleteId)
Returns recent (last 4 weeks), year to date and all time stats for a given athlete.
|
CompletableFuture<StravaStatistics> |
statisticsAsync(Integer athleteId)
Returns recent (last 4 weeks), year to date and all time stats for a given athlete.
|
StravaAthlete |
updateAuthenticatedAthlete(String city,
String state,
String country,
StravaGender sex,
Float weight)
Updates the personal details of the currently authenticated
athlete. |
CompletableFuture<StravaAthlete> |
updateAuthenticatedAthleteAsync(String city,
String state,
String country,
StravaGender sex,
Float weight)
Updates the personal details of the currently authenticated
athlete. |
clearCacheStravaAthlete getAthlete(Integer athleteId)
This request is used to retrieve information about any athlete on Strava.
Returns null if athlete does not exist
URL GET https://www.strava.com/api/v3/athletes/:id
athleteId - The id of the athlete to be returnedathlete even if the indicated athlete matches the authenticated athlete.CompletableFuture<StravaAthlete> getAthleteAsync(Integer athleteId)
This request is used to retrieve information about any athlete on Strava.
Returns null if athlete does not exist
URL GET https://www.strava.com/api/v3/athletes/:id
athleteId - The id of the athlete to be returnedathlete even if the indicated athlete matches the authenticated athlete.StravaAthlete getAuthenticatedAthlete()
This request is used to retrieve information about the currently authenticated athlete.
URL GET https://www.strava.com/api/v3/athlete
athleteUnauthorizedException - If the service's access token is invalidCompletableFuture<StravaAthlete> getAuthenticatedAthleteAsync()
This request is used to retrieve information about the currently authenticated athlete.
URL GET https://www.strava.com/api/v3/athlete
athleteUnauthorizedException - If the service's access token is invalidList<StravaAthlete> listAllAthleteFriends(Integer athleteId)
Convenience method for returning ALL of an athlete's friends
Returns ALL the athlete's friends, regardless of how many there are
Pagination is NOT supported.
Returns null if athlete with the given id is not found.
USE WITH CAUTION - ATHLETES WITH MANY FRIENDS WILL REQUIRE MANY CALLS TO THE STRAVA API
URL GET https://www.strava.com/api/v3/athletes/:id/friends
athleteId - The athlete whose friends are to be listednull if the athlete does not existCompletableFuture<List<StravaAthlete>> listAllAthleteFriendsAsync(Integer athleteId)
Convenience method for returning ALL of an athlete's friends
Returns ALL the athlete's friends, regardless of how many there are
Pagination is NOT supported.
Returns null if athlete with the given id is not found.
USE WITH CAUTION - ATHLETES WITH MANY FRIENDS WILL REQUIRE MANY CALLS TO THE STRAVA API
URL GET https://www.strava.com/api/v3/athletes/:id/friends
athleteId - The athlete whose friends are to be listednull if the athlete does not existList<StravaSegmentEffort> listAllAthleteKOMs(Integer athleteId)
Convenience method for returning ALL of an athlete's KOM's
Returns ALL the athlete's KOM's, regardless of how many there are
Pagination is NOT supported.
Returns null if athlete with the given id is not found.
USE WITH CAUTION - ATHLETES WITH MANY KOMS WILL REQUIRE MANY CALLS TO THE STRAVA API
URL GET https://www.strava.com/api/v3/athletes/:id/koms
athleteId - The athlete whose KOM'ss are to be listednull if the athlete does not existCompletableFuture<List<StravaSegmentEffort>> listAllAthleteKOMsAsync(Integer athleteId)
Convenience method for returning ALL of an athlete's KOM's
Returns ALL the athlete's KOM's, regardless of how many there are
Pagination is NOT supported.
Returns null if athlete with the given id is not found.
USE WITH CAUTION - ATHLETES WITH MANY KOMS WILL REQUIRE MANY CALLS TO THE STRAVA API
URL GET https://www.strava.com/api/v3/athletes/:id/koms
athleteId - The athlete whose KOM'ss are to be listednull if the athlete does not existList<StravaAthlete> listAllAthletesBothFollowing(Integer athleteId)
Convenience method for returning ALL of the athletes that both the authenticated athlete and the given athlete are following
Returns ALL the followers, regardless of how many there are
Pagination is NOT supported.
USE WITH CAUTION - ATHLETES WITH MANY FRIENDS WILL REQUIRE MANY CALLS TO THE STRAVA API
URL GET https://www.strava.com/api/v3/athletes/:id/both-following
athleteId - The athlete who the list is to be generated forCompletableFuture<List<StravaAthlete>> listAllAthletesBothFollowingAsync(Integer athleteId)
Convenience method for returning ALL of the athletes that both the authenticated athlete and the given athlete are following
Returns ALL the followers, regardless of how many there are
Pagination is NOT supported.
USE WITH CAUTION - ATHLETES WITH MANY FRIENDS WILL REQUIRE MANY CALLS TO THE STRAVA API
URL GET https://www.strava.com/api/v3/athletes/:id/both-following
athleteId - The athlete who the list is to be generated forList<StravaAthlete> listAllAuthenticatedAthleteFriends()
Convenience method for returning ALL of the authenticated athlete's friends
Returns ALL the authenticated athlete's friends, regardless of how many there are
Pagination is NOT supported.
USE WITH CAUTION - ATHLETES WITH MANY FRIENDS WILL REQUIRE MANY CALLS TO THE STRAVA API
URL GET https://www.strava.com/api/v3/athletes/friends
CompletableFuture<List<StravaAthlete>> listAllAuthenticatedAthleteFriendsAsync()
Convenience method for returning ALL of the authenticated athlete's friends
Returns ALL the authenticated athlete's friends, regardless of how many there are
Pagination is NOT supported.
USE WITH CAUTION - ATHLETES WITH MANY FRIENDS WILL REQUIRE MANY CALLS TO THE STRAVA API
URL GET https://www.strava.com/api/v3/athletes/friends
List<StravaAthlete> listAthleteFriends(Integer athleteId)
Friends are users an athlete is following. The activities owned by these users will appear in the current athlete's activity feed.
If the indicated athlete has blocked the authenticated athlete, the result will be an empty array.
Pagination is not supported. Returns only the first page of athletes.
Returns null if athlete with the given id is not found.
URL GET https://www.strava.com/api/v3/athletes/:id/friends
athleteId - The id of the athlete whose friends are to be listedathletes who are friends of the identified athlete. Will be empty if the identified athlete has blocked the
currently authenticated athlete.List<StravaAthlete> listAthleteFriends(Integer athleteId, Paging pagingInstruction)
Friends are users an athlete is following. The activities owned by these users will appear in the current athlete's activity feed.
If the indicated athlete has blocked the authenticated athlete, the result will be an empty array.
Pagination is supported.
Returns null if athlete with the given id is not found.
URL GET https://www.strava.com/api/v3/athletes/:id/friends
athleteId - The id of the athlete whose friends are to be listedpagingInstruction - (Optional) The page to be returnedathletes who are friends of the identified athlete. Will be empty if the identified athlete has blocked the
currently authenticated athlete.CompletableFuture<List<StravaAthlete>> listAthleteFriendsAsync(Integer athleteId)
Friends are users an athlete is following. The activities owned by these users will appear in the current athlete's activity feed.
If the indicated athlete has blocked the authenticated athlete, the result will be an empty array.
Pagination is not supported. Returns only the first page of athletes.
Returns null if athlete with the given id is not found.
URL GET https://www.strava.com/api/v3/athletes/:id/friends
athleteId - The id of the athlete whose friends are to be listedathletes who are friends of the identified athlete. Will be empty if the identified athlete has blocked the
currently authenticated athlete.CompletableFuture<List<StravaAthlete>> listAthleteFriendsAsync(Integer athleteId, Paging pagingInstruction)
Friends are users an athlete is following. The activities owned by these users will appear in the current athlete's activity feed.
If the indicated athlete has blocked the authenticated athlete, the result will be an empty array.
Pagination is supported.
Returns null if athlete with the given id is not found.
URL GET https://www.strava.com/api/v3/athletes/:id/friends
athleteId - The id of the athlete whose friends are to be listedpagingInstruction - (Optional) The page to be returnedathletes who are friends of the identified athlete. Will be empty if the identified athlete has blocked the
currently authenticated athlete.List<StravaSegmentEffort> listAthleteKOMs(Integer athleteId)
Returns an array of segment efforts representing KOMs/QOMs and course records held by the given athlete.
Results are sorted by date, newest first.
Pagination is not supported.
Returns null if athlete with the given id is not found.
URL GET https://www.strava.com/api/v3/athletes/:id/koms
athleteId - The id of the athlete whose KOM's are to be returnedsegment effort summary representationsList<StravaSegmentEffort> listAthleteKOMs(Integer athleteId, Paging pagingInstruction)
Returns an array of segment efforts representing KOMs/QOMs and course records held by the given athlete.
Results are sorted by date, newest first.
Pagination is supported.
Returns null if athlete with the given id is not found.
URL GET https://www.strava.com/api/v3/athletes/:id/koms
athleteId - The id of the athlete whose KOM's are to be returnedpagingInstruction - (Optional) The page to be returnedsegment effort summary representationsCompletableFuture<List<StravaSegmentEffort>> listAthleteKOMsAsync(Integer athleteId)
Returns an array of segment efforts representing KOMs/QOMs and course records held by the given athlete.
Results are sorted by date, newest first.
Pagination is not supported.
Returns null if athlete with the given id is not found.
URL GET https://www.strava.com/api/v3/athletes/:id/koms
athleteId - The id of the athlete whose KOM's are to be returnedsegment effort summary representationsCompletableFuture<List<StravaSegmentEffort>> listAthleteKOMsAsync(Integer athleteId, Paging pagingInstruction)
Returns an array of segment efforts representing KOMs/QOMs and course records held by the given athlete.
Results are sorted by date, newest first.
Pagination is supported.
Returns null if athlete with the given id is not found.
URL GET https://www.strava.com/api/v3/athletes/:id/koms
athleteId - The id of the athlete whose KOM's are to be returnedpagingInstruction - (Optional) The page to be returnedsegment effort summary representationsList<StravaAthlete> listAthletesBothFollowing(Integer athleteId)
Retrieve the athletes who both the authenticated athlete and the indicated athlete are following.
Pagination is not supported. Returns only the first page of athletes.
Returns null if athlete with the given id is not found.
URL GET https://www.strava.com/api/v3/athletes/:id/both-following
athleteId - The id of the athlete for whom the list of mutual friends is to be generatedathlete summary representations.List<StravaAthlete> listAthletesBothFollowing(Integer athleteId, Paging pagingInstruction)
Retrieve the athletes who both the authenticated athlete and the indicated athlete are following.
Pagination is supported.
Returns null if athlete with the given id is not found.
URL GET https://www.strava.com/api/v3/athletes/:id/both-following
athleteId - The id of the athlete for whom the list of mutual friends is to be generatedpagingInstruction - (Optional) The page to be returnedathlete summary representations.CompletableFuture<List<StravaAthlete>> listAthletesBothFollowingAsync(Integer athleteId)
Retrieve the athletes who both the authenticated athlete and the indicated athlete are following.
Pagination is not supported. Returns only the first page of athletes.
Returns null if athlete with the given id is not found.
URL GET https://www.strava.com/api/v3/athletes/:id/both-following
athleteId - The id of the athlete for whom the list of mutual friends is to be generatedathlete summary representations.CompletableFuture<List<StravaAthlete>> listAthletesBothFollowingAsync(Integer athleteId, Paging pagingInstruction)
Retrieve the athletes who both the authenticated athlete and the indicated athlete are following.
Pagination is supported.
Returns null if athlete with the given id is not found.
URL GET https://www.strava.com/api/v3/athletes/:id/both-following
athleteId - The id of the athlete for whom the list of mutual friends is to be generatedpagingInstruction - (Optional) The page to be returnedathlete summary representations.List<StravaAthlete> listAuthenticatedAthleteFriends()
Friends are users the current athlete is following. The activities owned by these users will appear in the current athlete's
activity feed.
This request is for the authenticated athlete's friends.
Pagination is not supported. Returns only the first page of athletes.
URL GET https://www.strava.com/api/v3/athletes/friends
athlete summary representations.List<StravaAthlete> listAuthenticatedAthleteFriends(Paging pagingInstruction)
Friends are users the current athlete is following. The activities owned by these users will appear in the current athlete's
activity feed.
This request is for the authenticated athlete's friends.
Pagination is supported.
URL GET https://www.strava.com/api/v3/athletes/friends
pagingInstruction - (Optional) The page to be returnedathlete summary representations.CompletableFuture<List<StravaAthlete>> listAuthenticatedAthleteFriendsAsync()
Friends are users the current athlete is following. The activities owned by these users will appear in the current athlete's
activity feed.
This request is for the authenticated athlete's friends.
Pagination is not supported. Returns only the first page of athletes.
URL GET https://www.strava.com/api/v3/athletes/friends
athlete summary representations.CompletableFuture<List<StravaAthlete>> listAuthenticatedAthleteFriendsAsync(Paging pagingInstruction)
Friends are users the current athlete is following. The activities owned by these users will appear in the current athlete's
activity feed.
This request is for the authenticated athlete's friends.
Pagination is supported.
URL GET https://www.strava.com/api/v3/athletes/friends
pagingInstruction - (Optional) The page to be returnedathlete summary representations.StravaStatistics statistics(Integer athleteId)
Returns recent (last 4 weeks), year to date and all time stats for a given athlete. Only available for the authenticated athlete.
This is the recommended endpoint when polling for athlete upload events.
Pagination is not supported. Returns all statistics for the athlete.
URL GET https://www.strava.com/api/v3/athletes/:id/stats
athleteId - The id of the athlete (must match authenticated athlete)CompletableFuture<StravaStatistics> statisticsAsync(Integer athleteId)
Returns recent (last 4 weeks), year to date and all time stats for a given athlete. Only available for the authenticated athlete.
This is the recommended endpoint when polling for athlete upload events.
Pagination is not supported. Returns all statistics for the athlete.
URL GET https://www.strava.com/api/v3/athletes/:id/stats
athleteId - The id of the athlete (must match authenticated athlete)StravaAthlete updateAuthenticatedAthlete(String city, String state, String country, StravaGender sex, Float weight)
Updates the personal details of the currently authenticated athlete.
Requires write permissions, as requested during the authorization process.
Only updates city, state, country, gender (sex) and weight.
URL PUT https://www.strava.com/api/v3/athlete
city - The city where the athlete wants Strava to think they livestate - The state, county or whatever the athlete wants Strava to think they livecountry - The country where the athlete wants Strava to think they livesex - The gender the athlete wants Strava to think they identify withweight - The weight that the athlete wants Strava to believe that they areCompletableFuture<StravaAthlete> updateAuthenticatedAthleteAsync(String city, String state, String country, StravaGender sex, Float weight)
Updates the personal details of the currently authenticated athlete.
Requires write permissions, as requested during the authorization process.
Only updates city, state, country, gender (sex) and weight.
URL PUT https://www.strava.com/api/v3/athlete
city - The city where the athlete wants Strava to think they livestate - The state, county or whatever the athlete wants Strava to think they livecountry - The country where the athlete wants Strava to think they livesex - The gender the athlete wants Strava to think they identify withweight - The weight that the athlete wants Strava to believe that they areStravaAthleteZones getAuthenticatedAthleteZones()
CompletableFuture<StravaAthleteZones> getAuthenticatedAthleteZonesAsync()
CompletableFuture)Copyright © 2016 Dan Shannon. All rights reserved.