public interface ActivityAPI
API declarations of activity service endpoints
@GET(value="/activities/{id}")
StravaActivity getActivity(@Path(value="id")
Integer id,
@Query(value="include_all_efforts")
Boolean includeAllEfforts)
throws NotFoundException
id - The id of the activity to be returnedincludeAllEfforts - (Optional) Used to include all segment efforts in the result (if omitted or false then only
"important" efforts are returned).activity is owned by the requesting athlete. Returns
a summary representation for all other requests.NotFoundException - If the activity does not exist@POST(value="/activities") StravaActivity createManualActivity(@Body StravaActivity activity) throws BadRequestException
activity - The activity to be created on StravaBadRequestException - If the activity is malformed and can't be uploadedActivityService.createManualActivity(javastrava.api.v3.model.StravaActivity)@PUT(value="/activities/{id}")
StravaActivity updateActivity(@Path(value="id")
Integer id,
@Body
StravaActivityUpdate activity)
throws NotFoundException
id - The id of the activity to updateactivity - The activity detailsNotFoundException - If the activity doesn't existActivityService.updateActivity(Integer, StravaActivityUpdate)@DELETE(value="/activities/{id}")
StravaActivity deleteActivity(@Path(value="id")
Integer id)
throws NotFoundException
id - Activity identifierNotFoundException - If the activity doesn't existActivityService.deleteActivity(java.lang.Integer)@GET(value="/athlete/activities") StravaActivity[] listAuthenticatedAthleteActivities(@Query(value="before") Integer before, @Query(value="after") Integer after, @Query(value="page") Integer page, @Query(value="per_page") Integer perPage)
before - Unix epoch time in seconds - return activities before this timeafter - Unix epoch time in seconds - return activities after this timepage - Page number to be returnedperPage - Page size to be returnedActivityService.listAuthenticatedAthleteActivities(java.util.Calendar, java.util.Calendar, javastrava.util.Paging)@GET(value="/activities/following") StravaActivity[] listFriendsActivities(@Query(value="page") Integer page, @Query(value="per_page") Integer perPage)
page - Page number to be returnedperPage - Page size to be returnedActivityService.listFriendsActivities(javastrava.util.Paging)@GET(value="/activities/{id}/zones")
StravaActivityZone[] listActivityZones(@Path(value="id")
Integer id)
throws NotFoundException
id - The activity identifierNotFoundException - If the activity doesn't existActivityService.listActivityZones(java.lang.Integer)@GET(value="/activities/{id}/laps")
StravaLap[] listActivityLaps(@Path(value="id")
Integer id)
throws NotFoundException
id - The activity identifierNotFoundException - If the activity doesn't existActivityService.listActivityLaps(java.lang.Integer)@GET(value="/activities/{id}/comments")
StravaComment[] listActivityComments(@Path(value="id")
Integer id,
@Query(value="markdown")
Boolean markdown,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage)
throws NotFoundException
id - Activity identifiermarkdown - Whether or not to return comments including markdownpage - Page number to be returnedperPage - Page size to be returnedNotFoundException - If the activity doesn't existActivityService.listActivityComments(Integer, Boolean, javastrava.util.Paging)@GET(value="/activities/{id}/kudos")
StravaAthlete[] listActivityKudoers(@Path(value="id")
Integer id,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage)
throws NotFoundException
id - Activity identifierpage - Page number to be returnedperPage - Page size to be returnedNotFoundException - If the activity doesn't existActivityService.listActivityKudoers(Integer, javastrava.util.Paging)@GET(value="/activities/{id}/photos")
StravaPhoto[] listActivityPhotos(@Path(value="id")
Integer id)
throws NotFoundException
id - Activity identifierNotFoundException - If the activity doesn't existActivityService.listActivityPhotos(java.lang.Integer)@GET(value="/activities/{id}/related")
StravaActivity[] listRelatedActivities(@Path(value="id")
Integer id,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage)
throws NotFoundException
id - Activity identifierpage - Page number to be returnedperPage - Page size to be returnedNotFoundException - If the activity doesn't existActivityService.listRelatedActivities(java.lang.Integer, javastrava.util.Paging)@POST(value="/activities/{id}/comments")
StravaComment createComment(@Path(value="id")
Integer id,
@Query(value="text")
String text)
throws BadRequestException,
NotFoundException
id - Activity identifiertext - Text of the comment to createNotFoundException - If the activity does not existBadRequestException - If the comment text is null or the empty stringActivityService.createComment(Integer, String)@DELETE(value="/activities/{activityId}/comments/{commentId}")
StravaResponse deleteComment(@Path(value="activityId")
Integer activityId,
@Path(value="commentId")
Integer commentId)
throws NotFoundException
activityId - Id of the activity the comment was posted tocommentId - Id of the commentNotFoundException - If the comment does not existActivityService.deleteComment(Integer, Integer)@POST(value="/activities/{id}/kudos")
StravaResponse giveKudos(@Path(value="id")
Integer activityId)
throws NotFoundException
activityId - Activity to be kudoedNotFoundException - if the activity does not existActivityService.giveKudos(Integer)Copyright © 2015 Dan Shannon. All rights reserved.