Class ApiExtensions
- Namespace
- Tudormobile.Strava.Api
- Assembly
- Tudormobile.Strava.dll
Extensions methods that enable access to the Strava APIs.
public static class ApiExtensions
- Inheritance
-
ApiExtensions
- Inherited Members
Remarks
You must include the Tudormobile.Strava.Api namespace in order to access the Strava APIs. Extensions are added to the StravaSession class, which is the main entry point for accessing the Strava APIs. Access to the current authenticated athlete is provided by all API methods.
Methods
ActivitiesApi(StravaSession)
Creates or returns the existing ActivitiesApi interface.
public static IActivitiesApi ActivitiesApi(this StravaSession session)
Parameters
sessionStravaSession
Returns
- IActivitiesApi
Interface for accessing the Strava Activities API.
AddQueryToUriString(string, IEnumerable<(string, object?)>)
Appends query parameters to a URI string.
public static string AddQueryToUriString(string uriString, IEnumerable<(string, object?)> queryParameters)
Parameters
uriStringstringThe base URI string to which query parameters will be added.
queryParametersIEnumerable<(string, object)>A collection of key-value pairs representing the query parameters to add. Values that are
nullare ignored.
Returns
- string
The URI string with the appended query parameters.
AthletesApi(StravaSession)
Creates or returns the existing AthletesApi interface.
public static IAthletesApi AthletesApi(this StravaSession session)
Parameters
sessionStravaSession
Returns
- IAthletesApi
Interface for accessing the Strava Athletes API.
ClubsApi(StravaSession)
Creates or returns the existing ClubsApi interface.
public static IClubsApi ClubsApi(this StravaSession session)
Parameters
sessionStravaSession
Returns
- IClubsApi
Interface for accessing the Strava Clubs API.
GearsApi(StravaSession)
Creates or returns the existing GearsApi interface.
public static IGearsApi GearsApi(this StravaSession session)
Parameters
sessionStravaSession
Returns
- IGearsApi
Interface for accessing the Strava Gears API.
RoutesApi(StravaSession)
Creates or returns the existing RoutesApi interface.
public static IRoutesApi RoutesApi(this StravaSession session)
Parameters
sessionStravaSession
Returns
- IRoutesApi
Interface for accessing the Strava Routes API.
SegmentsApi(StravaSession)
Creates or returns the existing SegmentsApi interface.
public static ISegmentsApi SegmentsApi(this StravaSession session)
Parameters
sessionStravaSession
Returns
- ISegmentsApi
Interface for accessing the Strava Segments API.
StreamsApi(StravaSession)
Creates or returns the existing StreamApi interface.
public static IStreamsApi StreamsApi(this StravaSession session)
Parameters
sessionStravaSession
Returns
- IStreamsApi
Interface for accessing the Strava Streams API.
UploadsApi(StravaSession)
Creates or returns the existing UploadsApi interface.
public static IUploadsApi UploadsApi(this StravaSession session)
Parameters
sessionStravaSession
Returns
- IUploadsApi
Interface for accessing the Strava Uploads API.