NAME

WebService::Strava::Segment - A Strava Segment Object

VERSION

version 0.06

SYNOPSIS

my $segment = WebService::Strava::Segment->new( auth => $auth, id => '229781' );

DESCRIPTION

Upon instantiation will retrieve the segment matching the id.
Requires a pre-authenticated WebService::Strava::Auth object.

METHODS

retrieve()

$segment->retrieve();

When a Segment object is lazy loaded, you can call retrieve it by calling this method.

list_efforts()

$segment->list_efforts([athlete_id => 123456], [page => 2], [efforts => 100], [raw => 1])'

Returns the Segment efforts for a particular segment. Takes 4 optional parameters of 'athlete_id', 'page', 'efforts' and 'raw'. Raw will return the an array segment_effort data instead of WebService::Strava::Athlete::Segment_Effort objects.

* 'athelete_id' will return the segment efforts (if any) for the athelete
  in question.

The results are paginated and a maximum of 200 results can be returned per page.

leaderboard

$segment->leaderboard(
  [page => 2], 
  [activities => 100], 
  [gender => M|F], 
  [following => 1|0], 
  [clubid => 123456], 
  [date_range => 'this_year'|'this_month'|'this_week'|'today'], 
  [age_group => '0_24'|'25_34'|'35_44'|'45_54'|'55_64'|'65_plus'],
  [weight_class => |'0_124'|'125_149'|'150_164'|'165_179'|'180_199'|'200_plus'|'0_54'|'55_64'|'65_74'|'75_84'|'85_94'|'95_plus']);

Returns the leaderboard for the current segment. Takes a number of optional parameters including 'page' and 'activities' (per page). For more information regarding the leaderboard information visit the api documentation http://strava.github.io/api/v3/segments/#leaderboard

The results are paginated and a maximum of 200 results can be returned per page.

AUTHOR

Leon Wright < techman@cpan.org >

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Leon Wright.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.