All URIs are relative to https://www.strava.com/api/v3
Method | HTTP request | Description |
---|---|---|
GetEffortsBySegmentId | GET /segments/{id}/all_efforts | List Segment Efforts |
GetSegmentEffortById | GET /segment_efforts/{id} | Get Segment Effort |
List GetEffortsBySegmentId (int? id, int? page, int? perPage)
List Segment Efforts
Returns a set of the authenticated athlete's segment efforts for a given segment.
using System;
using System.Diagnostics;
using Strava.NET.Api;
using Strava.NET.Client;
using Strava.NET.Model;
namespace Example
{
public class GetEffortsBySegmentIdExample
{
public void main()
{
// Configure OAuth2 access token for authorization: strava_oauth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new SegmentEffortsApi();
var id = 56; // int? | The identifier of the segment.
var page = 56; // int? | Page number. (optional)
var perPage = 56; // int? | Number of items per page. Defaults to 30. (optional) (default to 30)
try
{
// List Segment Efforts
List<DetailedSegmentEffort> result = apiInstance.GetEffortsBySegmentId(id, page, perPage);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling SegmentEffortsApi.GetEffortsBySegmentId: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | int? | The identifier of the segment. | |
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]
DetailedSegmentEffort GetSegmentEffortById (long? id)
Get Segment Effort
Returns a segment effort from an activity that is owned by the authenticated athlete.
using System;
using System.Diagnostics;
using Strava.NET.Api;
using Strava.NET.Client;
using Strava.NET.Model;
namespace Example
{
public class GetSegmentEffortByIdExample
{
public void main()
{
// Configure OAuth2 access token for authorization: strava_oauth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new SegmentEffortsApi();
var id = 789; // long? | The identifier of the segment effort.
try
{
// Get Segment Effort
DetailedSegmentEffort result = apiInstance.GetSegmentEffortById(id);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling SegmentEffortsApi.GetSegmentEffortById: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | long? | The identifier of the segment effort. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]