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 |
[DetailedSegmentEffort] getEffortsBySegmentId(id, opts)
List Segment Efforts
Returns a set of the authenticated athlete's segment efforts for a given segment.
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;
// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new StravaApiV3.SegmentEffortsApi();
var id = 56; // Number | The identifier of the segment.
var opts = {
'page': 56, // Number | Page number.
'perPage': 30 // Number | Number of items per page. Defaults to 30.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getEffortsBySegmentId(id, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The identifier of the segment. | |
page | Number | Page number. | [optional] |
perPage | Number | Number of items per page. Defaults to 30. | [optional] [default to 30] |
- Content-Type: Not defined
- Accept: application/json
DetailedSegmentEffort getSegmentEffortById(id)
Get Segment Effort
Returns a segment effort from an activity that is owned by the authenticated athlete.
var StravaApiV3 = require('strava_api_v3');
var defaultClient = StravaApiV3.ApiClient.instance;
// Configure OAuth2 access token for authorization: strava_oauth
var strava_oauth = defaultClient.authentications['strava_oauth'];
strava_oauth.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new StravaApiV3.SegmentEffortsApi();
var id = 789; // Number | The identifier of the segment effort.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getSegmentEffortById(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The identifier of the segment effort. |
- Content-Type: Not defined
- Accept: application/json