public class GearServiceImpl extends StravaServiceImpl implements GearService
Implementation of ClubService
api, requestRate, requestRateDaily| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
Clear any and all cached data entries
|
StravaGear |
getGear(String gearId)
Retrieve details about a specific item of
StravaGear. |
CompletableFuture<StravaGear> |
getGearAsync(String gearId)
Retrieve details about a specific item of
StravaGear. |
static GearService |
instance(Token token)
Returns an instance of
gear services |
accessTokenIsValid, future, getToken, requestRateDailyPercentage, requestRatePercentagepublic static GearService instance(Token token)
Returns an instance of gear 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 StravaGear getGear(String gearId)
GearService
Retrieve details about a specific item of StravaGear. The requesting StravaAthlete must own the StravaGear. At this time it is
not possible to view just anyone's gear type and usage.
Returns null if club with the given id does not exist
URL GET https://www.strava.com/api/v3/gear/:id
getGear in interface GearServicegearId - The id of the StravaGear to be retrieved.StravaGear representation.GearService.getGear(java.lang.String)public CompletableFuture<StravaGear> getGearAsync(String gearId)
GearService
Retrieve details about a specific item of StravaGear. The requesting StravaAthlete must own the StravaGear. At this time it is
not possible to view just anyone's gear type and usage.
Returns null if club with the given id does not exist
URL GET https://www.strava.com/api/v3/gear/:id
getGearAsync in interface GearServicegearId - The id of the StravaGear to be retrieved.StravaGear representation.GearService.getGearAsync(java.lang.String)Copyright © 2016 Dan Shannon. All rights reserved.