public interface ActivityAPI
API declarations of activity service endpoints
@POST(value="/activities/{id}/comments")
StravaComment createComment(@Path(value="id")
Integer activityId,
@Query(value="text")
String text)
throws BadRequestException,
NotFoundException
activityId - 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)@POST(value="/activities/{id}/comments")
void createComment(@Path(value="id")
Integer activityId,
@Query(value="text")
String text,
StravaAPICallback<StravaComment> callback)
throws BadRequestException,
NotFoundException
activityId - Activity identifiertext - Text of the comment to createcallback - Callback to be executed once the call is completedNotFoundException - If the activity does not existBadRequestException - If the comment text is null or the empty stringActivityService.createComment(Integer, String)@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)@POST(value="/activities")
void createManualActivity(@Body
StravaActivity activity,
StravaAPICallback<StravaActivity> callback)
throws BadRequestException
activity - The activity to be created on Stravacallback - Callback to be executed once the call is completedBadRequestException - If the activity is malformed and can't be uploadedActivityService.createManualActivity(javastrava.api.v3.model.StravaActivity)@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)@DELETE(value="/activities/{id}")
void deleteActivity(@Path(value="id")
Integer id,
StravaAPICallback<StravaActivity> callback)
throws NotFoundException
id - Activity identifiercallback - Callback to be executed once the call is completedNotFoundException - If the activity doesn't existActivityService.deleteActivity(java.lang.Integer)@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)@DELETE(value="/activities/{activityId}/comments/{commentId}")
void deleteComment(@Path(value="activityId")
Integer activityId,
@Path(value="commentId")
Integer commentId,
StravaAPICallback<StravaResponse> callback)
throws NotFoundException
activityId - Id of the activity the comment was posted tocommentId - Id of the commentcallback - Callback to be executed once the call is completedNotFoundException - If the comment does not existActivityService.deleteComment(Integer, Integer)@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@GET(value="/activities/{id}")
void getActivity(@Path(value="id")
Integer id,
@Query(value="include_all_efforts")
Boolean includeAllEfforts,
StravaAPICallback<StravaActivity> callback)
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).callback - Callback to be executed once the call is completedNotFoundException - If the activity does not existActivityService.getActivity(java.lang.Integer, java.lang.Boolean)@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)@POST(value="/activities/{id}/kudos")
void giveKudos(@Path(value="id")
Integer activityId,
StravaAPICallback<StravaResponse> callback)
throws NotFoundException
activityId - Activity to be kudoedcallback - Callback to be executed once the call is completedNotFoundException - if the activity does not existActivityService.giveKudos(Integer)@GET(value="/activities/{id}/comments")
StravaComment[] listActivityComments(@Path(value="id")
Integer activityId,
@Query(value="markdown")
Boolean markdown,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage)
throws NotFoundException,
BadRequestException
activityId - 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 existBadRequestException - If the paging instructions are invalidActivityService.listActivityComments(Integer, Boolean, javastrava.util.Paging)@GET(value="/activities/{id}/comments")
void listActivityComments(@Path(value="id")
Integer activityId,
@Query(value="markdown")
Boolean markdown,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage,
StravaAPICallback<StravaComment[]> callback)
throws NotFoundException,
BadRequestException
activityId - Activity identifiermarkdown - Whether or not to return comments including markdownpage - Page number to be returnedperPage - Page size to be returnedcallback - Callback to be executed once the call is completedNotFoundException - If the activity doesn't existBadRequestException - If the paging instructions are invalidActivityService.listActivityComments(Integer, Boolean, javastrava.util.Paging)@GET(value="/activities/{id}/kudos")
StravaAthlete[] listActivityKudoers(@Path(value="id")
Integer activityId,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage)
throws NotFoundException,
BadRequestException
activityId - Activity identifierpage - Page number to be returnedperPage - Page size to be returnedNotFoundException - If the activity doesn't existBadRequestException - If the paging instructions are invalidActivityService.listActivityKudoers(Integer, javastrava.util.Paging)@GET(value="/activities/{id}/kudos")
void listActivityKudoers(@Path(value="id")
Integer activityId,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage,
StravaAPICallback<StravaAthlete[]> callback)
throws NotFoundException,
BadRequestException
activityId - Activity identifierpage - Page number to be returnedperPage - Page size to be returnedcallback - Callback to be executed once the call is completedNotFoundException - If the activity doesn't existBadRequestException - If the paging instructions are invalidActivityService.listActivityKudoers(Integer, javastrava.util.Paging)@GET(value="/activities/{id}/laps")
StravaLap[] listActivityLaps(@Path(value="id")
Integer activityId)
throws NotFoundException
activityId - The activity identifierNotFoundException - If the activity doesn't existActivityService.listActivityLaps(java.lang.Integer)@GET(value="/activities/{id}/laps")
void listActivityLaps(@Path(value="id")
Integer activityId,
StravaAPICallback<StravaLap[]> callback)
throws NotFoundException
activityId - The activity identifiercallback - Callback to be executed once the call is completedNotFoundException - If the activity doesn't existActivityService.listActivityLaps(java.lang.Integer)@GET(value="/activities/{id}/photos")
StravaPhoto[] listActivityPhotos(@Path(value="id")
Integer activityId)
throws NotFoundException
activityId - Activity identifierNotFoundException - If the activity doesn't existActivityService.listActivityPhotos(java.lang.Integer)@GET(value="/activities/{id}/photos")
void listActivityPhotos(@Path(value="id")
Integer activityId,
StravaAPICallback<StravaPhoto[]> callback)
throws NotFoundException
activityId - Activity identifiercallback - Callback to be executed once the call is completedNotFoundException - If the activity doesn't existActivityService.listActivityPhotos(java.lang.Integer)@GET(value="/activities/{id}/zones")
StravaActivityZone[] listActivityZones(@Path(value="id")
Integer activityId)
throws NotFoundException
activityId - The activity identifierNotFoundException - If the activity doesn't existActivityService.listActivityZones(java.lang.Integer)@GET(value="/activities/{id}/zones")
void listActivityZones(@Path(value="id")
Integer activityId,
StravaAPICallback<StravaActivityZone[]> callback)
throws NotFoundException
activityId - The activity identifiercallback - Callback to be executed once the call is completedNotFoundException - If the activity doesn't existActivityService.listActivityZones(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) throws BadRequestException
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 returnedBadRequestException - If paging instructions are invalidActivityService.listAuthenticatedAthleteActivities(LocalDateTime, LocalDateTime, javastrava.util.Paging)@GET(value="/athlete/activities")
void listAuthenticatedAthleteActivities(@Query(value="before")
Integer before,
@Query(value="after")
Integer after,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage,
StravaAPICallback<StravaActivity[]> callback)
throws BadRequestException
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 returnedcallback - Callback to be executed once the call is completedBadRequestException - If paging instructions are invalidActivityService.listAuthenticatedAthleteActivities(LocalDateTime, LocalDateTime, javastrava.util.Paging)@GET(value="/activities/following") StravaActivity[] listFriendsActivities(@Query(value="page") Integer page, @Query(value="per_page") Integer perPage) throws BadRequestException
page - Page number to be returnedperPage - Page size to be returnedBadRequestException - If the paging instructions are invalidActivityService.listFriendsActivities(javastrava.util.Paging)@GET(value="/activities/following")
void listFriendsActivities(@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage,
StravaAPICallback<StravaActivity[]> callback)
throws BadRequestException
page - Page number to be returnedperPage - Page size to be returnedcallback - Callback to be executed once the call is completedBadRequestException - If the paging instructions are invalidActivityService.listFriendsActivities(javastrava.util.Paging)@GET(value="/activities/{id}/related")
StravaActivity[] listRelatedActivities(@Path(value="id")
Integer activityId,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage)
throws NotFoundException,
BadRequestException
activityId - Activity identifierpage - Page number to be returnedperPage - Page size to be returnedNotFoundException - If the activity doesn't existBadRequestException - If the paging instructions are invalidActivityService.listRelatedActivities(java.lang.Integer, javastrava.util.Paging)@GET(value="/activities/{id}/related")
void listRelatedActivities(@Path(value="id")
Integer activityId,
@Query(value="page")
Integer page,
@Query(value="per_page")
Integer perPage,
StravaAPICallback<StravaActivity[]> callback)
throws NotFoundException,
BadRequestException
activityId - Activity identifierpage - Page number to be returnedperPage - Page size to be returnedcallback - Callback to be executed once the call is completedNotFoundException - If the activity doesn't existBadRequestException - If the paging instructions are invalidActivityService.listRelatedActivities(java.lang.Integer, javastrava.util.Paging)@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)@PUT(value="/activities/{id}")
void updateActivity(@Path(value="id")
Integer id,
@Body
StravaActivityUpdate activity,
StravaAPICallback<StravaActivity> callback)
throws NotFoundException
id - The id of the activity to updateactivity - The activity detailscallback - Callback to be executed once the call is completedNotFoundException - If the activity doesn't existActivityService.updateActivity(Integer, StravaActivityUpdate)Copyright © 2016 Dan Shannon. All rights reserved.