public interface SegmentAPI
API definitions for the SegmentService Strava endpoints
@GET(value="/segments/{id}")
StravaSegment getSegment(@Path(value="id")
Integer segmentId)
throws NotFoundException
segmentId - The unique identifier of the segmentNotFoundException - If the segment with the given id does not existSegmentService.getSegment(java.lang.Integer)@GET(value="/segments/{id}")
void getSegment(@Path(value="id")
Integer segmentId,
StravaAPICallback<StravaSegment> callback)
throws NotFoundException
segmentId - The unique identifier of the segmentcallback - The callback to execute on completionNotFoundException - If the segment with the given id does not existSegmentService.getSegment(java.lang.Integer)@GET(value="/segments/{id}/leaderboard")
StravaSegmentLeaderboard getSegmentLeaderboard(@Path(value="id")
Integer segmentId,
@Query(value="gender")
StravaGender gender,
@Query(value="age_group")
StravaAgeGroup ageGroup,
@Query(value="weight_class")
StravaWeightClass weightClass,
@Query(value="following")
Boolean following,
@Query(value="club_id")
Integer clubId,
@Query(value="date_range")
StravaLeaderboardDateRange dateRange,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage,
@Query(value="context_entries")
Integer contextEntries)
throws NotFoundException,
BadRequestException
segmentId - Segment identifiergender - (Optional) Gender to filter the leaderboard byageGroup - (Optional) Age group to filter the leaderboard byweightClass - (Optional) Weight class to filter the leaderboard byfollowing - (Optional) If true then filter leaderboard by athletes the authenticated athlete is followingclubId - (Optional) Club to filter the leaderboard bydateRange - (Optional) Date range (this year, this month etc.) to filter the leaderboard bypage - (Optional) Page number to return (default is 1)perPage - (Optional) Page size to return (default is 50)contextEntries - (Optional) Number of context entries to return either side of the authenticated athlete (default is 2, maximum is 15)NotFoundException - If the segment with the given id doesn't existBadRequestException - If the paging instructions are invalidSegmentService.getSegmentLeaderboard(Integer, StravaGender, StravaAgeGroup, StravaWeightClass, Boolean, Integer, StravaLeaderboardDateRange, javastrava.util.Paging, Integer)@GET(value="/segments/{id}/leaderboard")
void getSegmentLeaderboard(@Path(value="id")
Integer segmentId,
@Query(value="gender")
StravaGender gender,
@Query(value="age_group")
StravaAgeGroup ageGroup,
@Query(value="weight_class")
StravaWeightClass weightClass,
@Query(value="following")
Boolean following,
@Query(value="club_id")
Integer clubId,
@Query(value="date_range")
StravaLeaderboardDateRange dateRange,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage,
@Query(value="context_entries")
Integer contextEntries,
StravaAPICallback<StravaSegmentLeaderboard> callback)
throws NotFoundException,
BadRequestException
segmentId - Segment identifiergender - (Optional) Gender to filter the leaderboard byageGroup - (Optional) Age group to filter the leaderboard byweightClass - (Optional) Weight class to filter the leaderboard byfollowing - (Optional) If true then filter leaderboard by athletes the authenticated athlete is followingclubId - (Optional) Club to filter the leaderboard bydateRange - (Optional) Date range (this year, this month etc.) to filter the leaderboard bypage - (Optional) Page number to return (default is 1)perPage - (Optional) Page size to return (default is 50)contextEntries - (Optional) Number of context entries to return either side of the authenticated athlete (default is 2, maximum is 15)callback - The callback to execute on completionNotFoundException - If the segment with the given id doesn't existBadRequestException - If the paging instructions are invalidSegmentService.getSegmentLeaderboard(Integer, StravaGender, StravaAgeGroup, StravaWeightClass, Boolean, Integer, StravaLeaderboardDateRange, javastrava.util.Paging, Integer)@GET(value="/segments/starred") StravaSegment[] listAuthenticatedAthleteStarredSegments(@Query(value="page") Integer page, @Query(value="per_page") Integer perPage) throws BadRequestException
page - (optional) Page number to be returnedperPage - (optional) Number of entries to return per pageBadRequestException - If the paging instructions are invalidSegmentService.listAuthenticatedAthleteStarredSegments(javastrava.util.Paging)@GET(value="/segments/starred")
void listAuthenticatedAthleteStarredSegments(@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage,
StravaAPICallback<StravaSegment[]> callback)
throws BadRequestException
page - (optional) Page number to be returnedperPage - (optional) Number of entries to return per pagecallback - The callback to execute on completionBadRequestException - If the paging instructions are invalidSegmentService.listAuthenticatedAthleteStarredSegments(javastrava.util.Paging)@GET(value="/segments/{id}/all_efforts")
StravaSegmentEffort[] listSegmentEfforts(@Path(value="id")
Integer segmentId,
@Query(value="athlete_id")
Integer athleteId,
@Query(value="start_date_local")
String start,
@Query(value="end_date_local")
String end,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage)
throws NotFoundException,
BadRequestException
segmentId - The id of the StravaSegment for which segment efforts are to be returnedathleteId - (Optional) id of the StravaAthlete to filter results bystart - (Optional) ISO 8601 formatted date timeend - (Optional) ISO 8601 formatted date timepage - (optional) Page number to be returnedperPage - (optional) Number of entries to return per pagesegment effort summary representations sorted by start_date_local
ascending or by elapsed_time if an athlete_id is provided.NotFoundException - If the segment with the given id doesn't existBadRequestException - If the paging instructions are invalidSegmentService.listSegmentEfforts(Integer, Integer, LocalDateTime, LocalDateTime, javastrava.util.Paging)@GET(value="/segments/{id}/all_efforts")
void listSegmentEfforts(@Path(value="id")
Integer segmentId,
@Query(value="athlete_id")
Integer athleteId,
@Query(value="start_date_local")
String start,
@Query(value="end_date_local")
String end,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage,
StravaAPICallback<StravaSegmentEffort[]> callback)
throws NotFoundException,
BadRequestException
segmentId - The id of the StravaSegment for which segment efforts are to be returnedathleteId - (Optional) id of the StravaAthlete to filter results bystart - (Optional) ISO 8601 formatted date timeend - (Optional) ISO 8601 formatted date timepage - (optional) Page number to be returnedperPage - (optional) Number of entries to return per pagecallback - The callback to execute on completionNotFoundException - If the segment with the given id doesn't existBadRequestException - If the paging instructions are invalidSegmentService.listSegmentEfforts(Integer, Integer, LocalDateTime, LocalDateTime, javastrava.util.Paging)@GET(value="/athletes/{id}/segments/starred")
StravaSegment[] listStarredSegments(@Path(value="id")
Integer athleteId,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage)
throws NotFoundException,
BadRequestException
athleteId - The id of the athlete whose starred segments are to be retrievedpage - (optional) Page number to be returnedperPage - (optional) Number of entries to return per pageNotFoundException - If the segment with the given id does not existUnauthorizedException - If there is a security or privacy violationBadRequestException - If the paging instructions are invalidSegmentService.listStarredSegments(java.lang.Integer, Paging)@GET(value="/athletes/{id}/segments/starred")
void listStarredSegments(@Path(value="id")
Integer athleteId,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage,
StravaAPICallback<StravaSegment[]> callback)
throws NotFoundException,
BadRequestException
athleteId - The id of the athlete whose starred segments are to be retrievedpage - (optional) Page number to be returnedperPage - (optional) Number of entries to return per pagecallback - The callback to execute on completionNotFoundException - If the segment with the given id does not existUnauthorizedException - If there is a security or privacy violationBadRequestException - If the paging instructions are invalidSegmentService.listStarredSegments(java.lang.Integer, Paging)@GET(value="/segments/explore") StravaSegmentExplorerResponse segmentExplore(@Query(value="bounds") String bounds, @Query(value="activity_type") StravaSegmentExplorerActivityType activityType, @Query(value="min_cat") StravaClimbCategory minCategory, @Query(value="max_cat") StravaClimbCategory maxCategory)
bounds - Pair of co-ordinates defining a box which is to be searched for segmentsactivityType - (Optional) Activity type to filter by (default is 'ride')minCategory - (Optional) Minimum climb category for which rides should be returnedmaxCategory - (Optional) Maximum climb category for which rides should be returnedSegmentService.segmentExplore(javastrava.api.v3.model.StravaMapPoint, javastrava.api.v3.model.StravaMapPoint, StravaSegmentExplorerActivityType, StravaClimbCategory, StravaClimbCategory)@GET(value="/segments/explore")
void segmentExplore(@Query(value="bounds")
String bounds,
@Query(value="activity_type")
StravaSegmentExplorerActivityType activityType,
@Query(value="min_cat")
StravaClimbCategory minCategory,
@Query(value="max_cat")
StravaClimbCategory maxCategory,
StravaAPICallback<StravaSegmentExplorerResponse> callback)
bounds - Pair of co-ordinates defining a box which is to be searched for segmentsactivityType - (Optional) Activity type to filter by (default is 'ride')minCategory - (Optional) Minimum climb category for which rides should be returnedmaxCategory - (Optional) Maximum climb category for which rides should be returnedcallback - The callback to execute on completionSegmentService.segmentExplore(javastrava.api.v3.model.StravaMapPoint, javastrava.api.v3.model.StravaMapPoint, StravaSegmentExplorerActivityType, StravaClimbCategory, StravaClimbCategory)Copyright © 2016 Dan Shannon. All rights reserved.