All URIs are relative to https://www.strava.com/api/v3
Method | HTTP request | Description |
---|---|---|
GetLoggedInAthlete | GET /athlete | Get Authenticated Athlete |
GetLoggedInAthleteZones | GET /athlete/zones | Get Zones |
GetStats | GET /athletes/{id}/stats | Get Athlete Stats |
UpdateLoggedInAthlete | PUT /athlete | Update Athlete |
DetailedAthlete GetLoggedInAthlete ()
Get Authenticated Athlete
Returns the currently authenticated athlete. Tokens with profile:read_all scope will receive a detailed athlete representation; all others will receive a summary representation.
using System;
using System.Diagnostics;
using Strava.NET.Api;
using Strava.NET.Client;
using Strava.NET.Model;
namespace Example
{
public class GetLoggedInAthleteExample
{
public void main()
{
// Configure OAuth2 access token for authorization: strava_oauth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new AthletesApi();
try
{
// Get Authenticated Athlete
DetailedAthlete result = apiInstance.GetLoggedInAthlete();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AthletesApi.GetLoggedInAthlete: " + e.Message );
}
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Zones GetLoggedInAthleteZones ()
Get Zones
Returns the the authenticated athlete's heart rate and power zones. Requires profile:read_all.
using System;
using System.Diagnostics;
using Strava.NET.Api;
using Strava.NET.Client;
using Strava.NET.Model;
namespace Example
{
public class GetLoggedInAthleteZonesExample
{
public void main()
{
// Configure OAuth2 access token for authorization: strava_oauth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new AthletesApi();
try
{
// Get Zones
Zones result = apiInstance.GetLoggedInAthleteZones();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AthletesApi.GetLoggedInAthleteZones: " + e.Message );
}
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ActivityStats GetStats (int? id, int? page, int? perPage)
Get Athlete Stats
Returns the activity stats of an athlete.
using System;
using System.Diagnostics;
using Strava.NET.Api;
using Strava.NET.Client;
using Strava.NET.Model;
namespace Example
{
public class GetStatsExample
{
public void main()
{
// Configure OAuth2 access token for authorization: strava_oauth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new AthletesApi();
var id = 56; // int? | The identifier of the athlete. Must match the authenticated athlete.
var page = 56; // int? | Page number. (optional)
var perPage = 56; // int? | Number of items per page. Defaults to 30. (optional) (default to 30)
try
{
// Get Athlete Stats
ActivityStats result = apiInstance.GetStats(id, page, perPage);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AthletesApi.GetStats: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | int? | The identifier of the athlete. Must match the authenticated athlete. | |
page | int? | Page number. | [optional] |
perPage | int? | Number of items per page. Defaults to 30. | [optional] [default to 30] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DetailedAthlete UpdateLoggedInAthlete (float? weight)
Update Athlete
Update the currently authenticated athlete. Requires profile:write scope.
using System;
using System.Diagnostics;
using Strava.NET.Api;
using Strava.NET.Client;
using Strava.NET.Model;
namespace Example
{
public class UpdateLoggedInAthleteExample
{
public void main()
{
// Configure OAuth2 access token for authorization: strava_oauth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new AthletesApi();
var weight = 3.4; // float? | The weight of the athlete in kilograms.
try
{
// Update Athlete
DetailedAthlete result = apiInstance.UpdateLoggedInAthlete(weight);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AthletesApi.UpdateLoggedInAthlete: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
weight | float? | The weight of the athlete in kilograms. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]