public class ClubServiceImpl extends StravaServiceImpl implements ClubService
Implementation of ClubService
api, requestRate, requestRateDailyaccessTokenIsValid, future, getToken, requestRateDailyPercentage, requestRatePercentagepublic static ClubService instance(Token token)
Returns an instance of club services
Instances are cached so that if 2 requests are made for the same token, the same instance is returned
token - The Strava access token to be used in requests to the Strava
APIUnauthorizedException - If the token used to create the service is invalidpublic void clearCache()
StravaServiceClear any and all cached data entries
Primarily used when revoking/deauthorising a token so that there are no entries remaining that are associated with the token that could mistakenly get returned
clearCache in interface StravaServiceStravaService.clearCache()public StravaClub getClub(Integer id)
ClubService
Retrieve details about a specific club. The club must be public or the current athlete must be a member.
Returns null if club with the given id does not exist
Returns an empty club (with only the id set) if the club is private and the authenticated athlete is not a member
URL GET https://www.strava.com/api/v3/clubs/:id
getClub in interface ClubServiceid - The id of the StravaClub to be retrievedClubService.getClub(java.lang.Integer)public CompletableFuture<StravaClub> getClubAsync(Integer clubId)
ClubService
Retrieve details about a specific club. The club must be public or the current athlete must be a member.
Returns null if club with the given id does not exist
Returns an empty club (with only the id set) if the club is private and the authenticated athlete is not a member
URL GET https://www.strava.com/api/v3/clubs/:id
getClubAsync in interface ClubServiceclubId - The id of the StravaClub to be retrievedClubService.getClubAsync(java.lang.Integer)public StravaClubMembershipResponse joinClub(Integer id)
ClubServiceJoin a club on behalf of the authenticated user. An access token with write permissions is required.
joinClub in interface ClubServiceid - ID of the StravaClub to joinClubService.joinClub(java.lang.Integer)public CompletableFuture<StravaClubMembershipResponse> joinClubAsync(Integer clubId)
ClubServiceJoin a club on behalf of the authenticated user. An access token with write permissions is required.
joinClubAsync in interface ClubServiceclubId - ID of the StravaClub to joinClubService.joinClubAsync(java.lang.Integer)public StravaClubMembershipResponse leaveClub(Integer id)
ClubServiceLeave a club on behalf of the authenticated user. An access token with write permissions is required.
leaveClub in interface ClubServiceid - ID of the club to joinClubService.leaveClub(java.lang.Integer)public CompletableFuture<StravaClubMembershipResponse> leaveClubAsync(Integer clubId)
ClubServiceLeave a club on behalf of the authenticated user. An access token with write permissions is required.
leaveClubAsync in interface ClubServiceclubId - ID of the club to joinClubService.leaveClubAsync(java.lang.Integer)public List<StravaAthlete> listAllClubMembers(Integer clubId)
ClubServiceConvenience method for returning ALL of the members of a club
Returns ALL the members, regardless of how many there are
Pagination is NOT supported.
USE WITH CAUTION - CLUBS WITH MANY MEMBERS WILL REQUIRE MANY CALLS TO THE STRAVA API
Returns null if club with the given id does not exist
Returns an empty list if the club is private
URL GET https://www.strava.com/api/v3/clubs/:id/members
listAllClubMembers in interface ClubServiceclubId - The id of the StravaClub whose member athletes should be returnedathlete summary representations.ClubService.listAllClubMembers(java.lang.Integer)public CompletableFuture<List<StravaAthlete>> listAllClubMembersAsync(Integer clubId)
ClubServiceConvenience method for returning ALL of the members of a club
Returns ALL the members, regardless of how many there are
Pagination is NOT supported.
USE WITH CAUTION - CLUBS WITH MANY MEMBERS WILL REQUIRE MANY CALLS TO THE STRAVA API
Returns null if club with the given id does not exist
Returns an empty list if the club is private
URL GET https://www.strava.com/api/v3/clubs/:id/members
listAllClubMembersAsync in interface ClubServiceclubId - The id of the StravaClub whose member athletes should be returnedathlete summary representations.ClubService.listAllClubMembersAsync(java.lang.Integer)public List<StravaActivity> listAllRecentClubActivities(Integer clubId)
ClubService
Retrieve ALL the recent activities performed by member athletes of a specific club.
The authenticated athlete must be a member of the club.
Returns null if club with the given id does not exist
Returns an empty list if the authorised athlete is not a member of the club
Pagination is supported. However, the results are limited to the last 200 total activities by club members.
listAllRecentClubActivities in interface ClubServiceclubId - The id of the StravaClub for which recent activities are to be returned.activity summary representations.ClubService.listAllRecentClubActivities(java.lang.Integer)public CompletableFuture<List<StravaActivity>> listAllRecentClubActivitiesAsync(Integer clubId)
ClubService
Retrieve ALL the recent activities performed by member athletes of a specific club.
The authenticated athlete must be a member of the club.
Returns null if club with the given id does not exist
Returns an empty list if the authorised athlete is not a member of the club
Pagination is supported. However, the results are limited to the last 200 total activities by club members.
listAllRecentClubActivitiesAsync in interface ClubServiceclubId - The id of the StravaClub for which recent activities are to be returned.activity summary representations.ClubService.listAllRecentClubActivitiesAsync(java.lang.Integer)public List<StravaClub> listAuthenticatedAthleteClubs()
ClubService
Fetch an array of clubs that the currently authenticated athlete is a member of.
Pagination is not supported. Returns all clubs of which the athlete is a member.
URL GET https://www.strava.com/api/v3/athlete/clubs
listAuthenticatedAthleteClubs in interface ClubServiceclub summary representations.ClubService.listAuthenticatedAthleteClubs()public CompletableFuture<List<StravaClub>> listAuthenticatedAthleteClubsAsync()
ClubService
Fetch an array of clubs that the currently authenticated athlete is a member of.
Pagination is not supported. Returns all clubs of which the athlete is a member.
URL GET https://www.strava.com/api/v3/athlete/clubs
listAuthenticatedAthleteClubsAsync in interface ClubServiceclub summary representations.ClubService.listAuthenticatedAthleteClubsAsync()public List<StravaClubAnnouncement> listClubAnnouncements(Integer clubId)
ClubServiceAnnouncements are posts sent by Club Admins or Owners to the members of a club.
Only members of private clubs can access their announcements.
The objects are returned in summary representation.
Returns null if the club with the given id does not exist.
Returns an empty list if the club is private and the authorised athlete is not a member of the club
Pagination is not supported
listClubAnnouncements in interface ClubServiceclubId - The id of the StravaClub for which announcements should be returned.announcementsClubService.listClubAnnouncements(java.lang.Integer)public CompletableFuture<List<StravaClubAnnouncement>> listClubAnnouncementsAsync(Integer clubId)
ClubServiceAnnouncements are posts sent by Club Admins or Owners to the members of a club.
Only members of private clubs can access their announcements.
The objects are returned in summary representation.
Returns null if the club with the given id does not exist.
Returns an empty list if the club is private and the authorised athlete is not a member of the club
Pagination is not supported
listClubAnnouncementsAsync in interface ClubServiceclubId - The id of the StravaClub for which announcements should be returned.announcementsClubService.listClubAnnouncementsAsync(java.lang.Integer)public List<StravaClubEvent> listClubGroupEvents(Integer clubId)
ClubServiceGroup Events are optionally recurring events for club members.
Only club members can access private club events.
The objects are returned in summary representation.
Pagination is NOT supported
listClubGroupEvents in interface ClubServiceclubId - Club identifierClubService.listClubGroupEvents(java.lang.Integer)public CompletableFuture<List<StravaClubEvent>> listClubGroupEventsAsync(Integer clubId)
ClubServiceGroup Events are optionally recurring events for club members.
Only club members can access private club events.
The objects are returned in summary representation.
Pagination is NOT supported
listClubGroupEventsAsync in interface ClubServiceclubId - Club identifierCompletableFuture.get())ClubService.listClubGroupEventsAsync(java.lang.Integer)public List<StravaAthlete> listClubMembers(Integer id)
ClubService
Retrieve summary information about member athletes of a specific club.
Pagination is not supported. Returns only the first page of members.
Returns null if club with the given id does not exist
Returns an empty list if the club is private
URL GET https://www.strava.com/api/v3/clubs/:id/members
listClubMembers in interface ClubServiceid - The id of the StravaClub whose member athletes should be returnedathlete summary representations.ClubService.listClubMembers(java.lang.Integer)public List<StravaAthlete> listClubMembers(Integer id, Paging pagingInstruction)
ClubService
Retrieve summary information about member athletes of a specific club.
Pagination is supported.
Returns null if club with the given id does not exist
Returns an empty list if the club is private
URL GET https://www.strava.com/api/v3/clubs/:id/members
listClubMembers in interface ClubServiceid - The id of the StravaClub whose member athletes should be returnedpagingInstruction - (Optional) The page to be returnedathlete summary representations.ClubService.listClubMembers(Integer,
Paging)public CompletableFuture<List<StravaAthlete>> listClubMembersAsync(Integer clubId)
ClubService
Retrieve summary information about member athletes of a specific club.
Pagination is not supported. Returns only the first page of members.
Returns null if club with the given id does not exist
Returns an empty list if the club is private
URL GET https://www.strava.com/api/v3/clubs/:id/members
listClubMembersAsync in interface ClubServiceclubId - The id of the StravaClub whose member athletes should be returnedathlete summary representations.ClubService.listClubMembersAsync(java.lang.Integer)public CompletableFuture<List<StravaAthlete>> listClubMembersAsync(Integer clubId, Paging pagingInstruction)
ClubService
Retrieve summary information about member athletes of a specific club.
Pagination is supported.
Returns null if club with the given id does not exist
Returns an empty list if the club is private
URL GET https://www.strava.com/api/v3/clubs/:id/members
listClubMembersAsync in interface ClubServiceclubId - The id of the StravaClub whose member athletes should be returnedpagingInstruction - (Optional) The page to be returnedathlete summary representations.ClubService.listClubMembersAsync(java.lang.Integer,
javastrava.util.Paging)public List<StravaActivity> listRecentClubActivities(Integer id)
ClubService
Retrieve the recent activities performed by member athletes of a specific club.
The authenticated athlete must be a member of the club.
Pagination is NOT supported. Returns only the first page of activities.
Returns null if club with the given id does not exist
Returns an empty list if the authorised athlete is not a member of the club
listRecentClubActivities in interface ClubServiceid - The id of the StravaClub for which recent activities are to be returned.activity summary representations.ClubService.listRecentClubActivities(java.lang.Integer)public List<StravaActivity> listRecentClubActivities(Integer id, Paging pagingInstruction)
ClubService
Retrieve the recent activities performed by member athletes of a specific club.
The authenticated athlete must be a member of the club.
Returns null if club with the given id does not exist
Returns an empty list if the authorised athlete is not a member of the club
Pagination is supported. However, the results are limited to the last 200 total activities by club members.
listRecentClubActivities in interface ClubServiceid - The id of the StravaClub for which recent activities are to be returned.pagingInstruction - (Optional) The page to be returnedactivity summary representations.ClubService.listRecentClubActivities(Integer,
Paging)public CompletableFuture<List<StravaActivity>> listRecentClubActivitiesAsync(Integer clubId)
ClubService
Retrieve the recent activities performed by member athletes of a specific club.
The authenticated athlete must be a member of the club.
Pagination is NOT supported. Returns only the first page of activities.
Returns null if club with the given id does not exist
Returns an empty list if the authorised athlete is not a member of the club
listRecentClubActivitiesAsync in interface ClubServiceclubId - The id of the StravaClub for which recent activities are to be returned.activity summary representations.ClubService.listRecentClubActivitiesAsync(java.lang.Integer)public CompletableFuture<List<StravaActivity>> listRecentClubActivitiesAsync(Integer clubId, Paging pagingInstruction)
ClubService
Retrieve the recent activities performed by member athletes of a specific club.
The authenticated athlete must be a member of the club.
Returns null if club with the given id does not exist
Returns an empty list if the authorised athlete is not a member of the club
Pagination is supported. However, the results are limited to the last 200 total activities by club members.
listRecentClubActivitiesAsync in interface ClubServiceclubId - The id of the StravaClub for which recent activities are to be returned.pagingInstruction - (Optional) The page to be returnedactivity summary representations.ClubService.listRecentClubActivitiesAsync(java.lang.Integer,
javastrava.util.Paging)public List<StravaAthlete> listClubAdmins(Integer clubId)
listClubAdmins in interface ClubServicepublic CompletableFuture<List<StravaAthlete>> listClubAdminsAsync(Integer clubId)
listClubAdminsAsync in interface ClubServicepublic List<StravaAthlete> listClubAdmins(Integer clubId, Paging paging)
listClubAdmins in interface ClubServicepublic CompletableFuture<List<StravaAthlete>> listClubAdminsAsync(Integer clubId, Paging paging)
listClubAdminsAsync in interface ClubServicepublic List<StravaAthlete> listAllClubAdmins(Integer clubId)
listAllClubAdmins in interface ClubServicepublic CompletableFuture<List<StravaAthlete>> listAllClubAdminsAsync(Integer clubId)
listAllClubAdminsAsync in interface ClubServiceCopyright © 2016 Dan Shannon. All rights reserved.