public interface UploadAPI
API definitions for UploadService endpoints
| Modifier and Type | Method and Description |
|---|---|
StravaUploadResponse |
checkUploadStatus(Integer uploadId) |
void |
checkUploadStatus(Integer uploadId,
StravaAPICallback<StravaUploadResponse> callback) |
StravaUploadResponse |
upload(StravaActivityType activityType,
String name,
String description,
Boolean _private,
Boolean trainer,
Boolean commute,
String dataType,
String externalId,
retrofit.mime.TypedFile file) |
void |
upload(StravaActivityType activityType,
String name,
String description,
Boolean _private,
Boolean trainer,
Boolean commute,
String dataType,
String externalId,
retrofit.mime.TypedFile file,
StravaAPICallback<StravaUploadResponse> callback) |
@GET(value="/uploads/{id}")
StravaUploadResponse checkUploadStatus(@Path(value="id")
Integer uploadId)
uploadId - The upload id as given back in the response to upload(StravaActivityType, String, String, Boolean, Boolean, Boolean, String, String, TypedFile)UploadService.checkUploadStatus(Integer)@GET(value="/uploads/{id}")
void checkUploadStatus(@Path(value="id")
Integer uploadId,
StravaAPICallback<StravaUploadResponse> callback)
uploadId - The upload id as given back in the response to upload(StravaActivityType, String, String, Boolean, Boolean, Boolean, String, String, TypedFile, StravaAPICallback)callback - The callback to execute on completionUploadService.checkUploadStatus(Integer)@Multipart @POST(value="/uploads") StravaUploadResponse upload(@Part(value="activity_type") StravaActivityType activityType, @Part(value="name") String name, @Part(value="description") String description, @Part(value="private") Boolean _private, @Part(value="trainer") Boolean trainer, @Part(value="commute") Boolean commute, @Part(value="data_type") String dataType, @Part(value="external_id") String externalId, @Part(value="file") retrofit.mime.TypedFile file) throws BadRequestException
activityType - Type of activity being uploadedname - Name of the activitydescription - (Optional) Description of the activity_private - (Optional) Whether the activity should be flagged as privatetrainer - (Optional) If true then the activity was done on a stationary trainercommute - (Optional) If true then the activity represents a commutedataType - Type of data file being uploadedexternalId - (Optional) External identifier generated by your application which Strava will later use as a reference when you're checking upload statusfile - The file to be uploaded!BadRequestException - If required elements of the call are missingUploadService.upload(StravaActivityType, String, String, Boolean, Boolean, Boolean, String, String, java.io.File)@Multipart
@POST(value="/uploads")
void upload(@Part(value="activity_type")
StravaActivityType activityType,
@Part(value="name")
String name,
@Part(value="description")
String description,
@Part(value="private")
Boolean _private,
@Part(value="trainer")
Boolean trainer,
@Part(value="commute")
Boolean commute,
@Part(value="data_type")
String dataType,
@Part(value="external_id")
String externalId,
@Part(value="file")
retrofit.mime.TypedFile file,
StravaAPICallback<StravaUploadResponse> callback)
throws BadRequestException
activityType - Type of activity being uploadedname - Name of the activitydescription - (Optional) Description of the activity_private - (Optional) Whether the activity should be flagged as privatetrainer - (Optional) If true then the activity was done on a stationary trainercommute - (Optional) If true then the activity represents a commutedataType - Type of data file being uploadedexternalId - (Optional) External identifier generated by your application which Strava will later use as a reference when you're checking upload statusfile - The file to be uploaded!callback - The callback to execute on completionBadRequestException - If required elements of the call are missingUploadService.upload(StravaActivityType, String, String, Boolean, Boolean, Boolean, String, String, java.io.File)Copyright © 2016 Dan Shannon. All rights reserved.