Table of Contents

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

id long

The unique identifier of the upload.

cancellationToken CancellationToken

A 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

filename string

The path to the activity file to upload.

name string

The name of the activity.

description string

The description of the activity.

trainer string

Set to "1" if the activity was performed on a trainer, otherwise "0".

commute string

Set to "1" if the activity was a commute, otherwise "0".

dataType string

The format of the uploaded file (e.g., "fit", "gpx", "tcx").

externalId string

An identifier to associate with the upload for deduplication.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<ApiResult<Upload>>

An ApiResult<T> containing the upload status.