public interface SegmentAPI
API definitions for the SegmentService Strava endpoints
| Modifier and Type | Method and Description |
|---|---|
StravaClub |
getClub(Integer id) |
StravaSegment |
getSegment(Integer id) |
StravaSegmentLeaderboard |
getSegmentLeaderboard(Integer id,
StravaGender gender,
StravaAgeGroup ageGroup,
StravaWeightClass weightClass,
Boolean following,
Integer clubId,
StravaLeaderboardDateRange dateRange,
Integer page,
Integer perPage,
Integer contextEntries) |
StravaSegment[] |
listAuthenticatedAthleteStarredSegments(Integer page,
Integer perPage) |
StravaSegmentEffort[] |
listSegmentEfforts(Integer id,
Integer athleteId,
String start,
String end,
Integer page,
Integer perPage) |
StravaSegment[] |
listStarredSegments(Integer id,
Integer page,
Integer perPage) |
StravaSegmentExplorerResponse |
segmentExplore(String bounds,
StravaSegmentExplorerActivityType activityType,
StravaClimbCategory minCategory,
StravaClimbCategory maxCategory) |
@GET(value="/clubs/{id}")
StravaClub getClub(@Path(value="id")
Integer id)
throws NotFoundException
id - Club identifierNotFoundException - If the club with the given id doesn't existClubService.getClub(java.lang.Integer)@GET(value="/segments/{id}")
StravaSegment getSegment(@Path(value="id")
Integer id)
throws NotFoundException
id - The unique identifier of the segmentNotFoundException - If the segment with the given id does not exist@GET(value="/segments/starred") StravaSegment[] listAuthenticatedAthleteStarredSegments(@Query(value="page") Integer page, @Query(value="per_page") Integer perPage)
page - (optional) Page number to be returnedperPage - (optional) Number of entries to return per pageSegmentService.listAuthenticatedAthleteStarredSegments(javastrava.util.Paging)@GET(value="/athletes/{id}/segments/starred")
StravaSegment[] listStarredSegments(@Path(value="id")
Integer id,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage)
throws NotFoundException
id - 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 violation@GET(value="/segments/{id}/all_efforts")
StravaSegmentEffort[] listSegmentEfforts(@Path(value="id")
Integer id,
@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
id - 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 existSegmentService.listSegmentEfforts(Integer, Integer, java.util.Calendar, java.util.Calendar, javastrava.util.Paging)@GET(value="/segments/{id}/leaderboard")
StravaSegmentLeaderboard getSegmentLeaderboard(@Path(value="id")
Integer id,
@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
id - 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 existSegmentService.getSegmentLeaderboard(Integer, StravaGender, StravaAgeGroup, StravaWeightClass, Boolean, Integer, StravaLeaderboardDateRange, javastrava.util.Paging, Integer)@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)Copyright © 2015 Dan Shannon. All rights reserved.