public class SegmentEffortServiceImpl extends StravaServiceImpl implements SegmentEffortService
api, requestRate, requestRateDaily| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
Clear any and all cached data entries
|
StravaSegmentEffort |
getSegmentEffort(Long segmentEffortId)
Retrieve details about a specific segment effort.
|
CompletableFuture<StravaSegmentEffort> |
getSegmentEffortAsync(Long segmentEffortId)
Retrieve details about a specific segment effort.
|
static SegmentEffortService |
instance(Token token)
Returns an instance of
segment effort
services |
accessTokenIsValid, future, getToken, requestRateDailyPercentage, requestRatePercentagepublic static SegmentEffortService instance(Token token)
Returns an instance of segment effort
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
APIpublic 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 StravaSegmentEffort getSegmentEffort(Long segmentEffortId)
SegmentEffortServiceRetrieve details about a specific segment effort. The effort must be public or it must correspond to the current athlete.
Returns null if the segment effort does not exist or is private
URL GET https://www.strava.com/api/v3/segment_efforts/:id
getSegmentEffort in interface SegmentEffortServicesegmentEffortId - The id of the segment to be retrievedSegmentEffortService.getSegmentEffort(Long)public CompletableFuture<StravaSegmentEffort> getSegmentEffortAsync(Long segmentEffortId)
SegmentEffortServiceRetrieve details about a specific segment effort. The effort must be public or it must correspond to the current athlete.
Returns null if the segment effort does not exist or is private
URL GET https://www.strava.com/api/v3/segment_efforts/:id
getSegmentEffortAsync in interface SegmentEffortServicesegmentEffortId - The id of the segment to be retrievedSegmentEffortService.getSegmentEffortAsync(java.lang.Long)Copyright © 2016 Dan Shannon. All rights reserved.