Efforts() public method

Returns a list of matching Efforts on a Segment. The response includes the Id of the Effort, the elapsed time of the Effort, and the Id, Name, and Username of the Athlete who ride the Effort. Efforts are ordered by start date, oldest to newest.
public Efforts ( int segmentId, int clubId = null, int athleteId = null, string athleteName = null, System.DateTime startDate = null, System.DateTime endDate = null, int startId = null, bool isBest = null, int offset = null ) : SegmentEfforts
segmentId int Required. The Id of the Segment.
clubId int Optional. Id of the Club for which to search for member's Efforts.
athleteId int Optional. Id of the Athlete for which to search for Efforts.
athleteName string Optional. Username of the Athlete for which to search for Rides.
startDate System.DateTime Optional. Day on which to start search for Efforts. The date is the local time of when the effort started.
endDate System.DateTime Optional. Day on which to end search for Efforts. The date is the local time of when the effort started.
startId int Optional. Only return Effforts with an Id greater than or equal to the startId.
isBest bool Optional. Shows an best efforts per athlete sorted by elapsed time ascending (segment leaderboard).
offset int Optional. Any search will return at most 50 rows. To retrieve results after the 50th row use the offset parameter. For example, to retrieve rows 51-100 use an offset of 50.
return SegmentEfforts
Ejemplo n.º 1
0
        private void GetEfforts(SegmentService serv)
        {
            SegmentEfforts stravaEfforts;
            int offset = 0;
            do
            {
                stravaEfforts = serv.Efforts(segmentID, offset: offset);

                if (BreakAtOffset > 0 && offset > BreakAtOffset)
                    break;

            } while (GetEffortsLoop(ref stravaEfforts, ref offset));
        }