Files
wp-strava/lib/WPStrava/Routes.php
T

23 lines
499 B
PHP
Raw Normal View History

2017-12-16 12:52:52 +00:00
<?php
/**
2017-12-16 12:52:52 +00:00
* Routes is a class wrapper for the Strava REST API functions.
*
* @author Daniel Lintott
* @since 1.3.0
2017-12-16 12:52:52 +00:00
*/
2017-12-26 13:22:22 -06:00
class WPStrava_Routes {
const ROUTES_URL = 'http://strava.com/routes/';
2017-12-16 12:52:52 +00:00
2017-12-26 13:22:22 -06:00
/**
* Get single route by ID.
*
* @param int $route_id ID of activity to retrieve.
* @return object stdClass representing this route.
* @author Daniel Lintott
*/
public function get_route( $route_id ) {
return WPStrava::get_instance()->get_api()->get( "routes/{$route_id}" );
}
}