Interface IUploadsApi
- Namespace
- Tudormobile.Strava.Api
- Assembly
- Tudormobile.Strava.dll
Strava V3 Uploads API Interface.
public interface IUploadsApi
Methods
GetUploadAsync(long, CancellationToken)
Gets the status of an upload by its unique identifier.
Task<ApiResult<Upload>> GetUploadAsync(long id, CancellationToken cancellationToken = default)
Parameters
idlongThe unique identifier of the upload.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<ApiResult<Upload>>
An ApiResult<T> containing the upload status.
UploadActivityAsync(string, string, string, string, string, string, string, CancellationToken)
Uploads an activity file to Strava.
Task<ApiResult<Upload>> UploadActivityAsync(string filename, string name, string description, string trainer, string commute, string dataType, string externalId, CancellationToken cancellationToken = default)
Parameters
filenamestringThe path to the activity file to upload.
namestringThe name of the activity.
descriptionstringThe description of the activity.
trainerstringSet to "1" if the activity was performed on a trainer, otherwise "0".
commutestringSet to "1" if the activity was a commute, otherwise "0".
dataTypestringThe format of the uploaded file (e.g., "fit", "gpx", "tcx").
externalIdstringAn identifier to associate with the upload for deduplication.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<ApiResult<Upload>>
An ApiResult<T> containing the upload status.