createActivity() public method

public createActivity ( string $name, string $type, string $start_date_local, integer $elapsed_time, string $description = null, double $distance = null )
$name string
$type string
$start_date_local string
$elapsed_time integer
$description string
$distance double
Ejemplo n.º 1
0
 /**
  * Create an activity
  * 
  * @link    http://strava.github.io/api/v3/activities/#create
  * @param   string $name
  * @param   string $type
  * @param   string $start_date_local
  * @param   int $elapsed_time
  * @param   string $description
  * @param   float $distance
  * @return  array
  * @throws  Exception
  */
 public function createActivity($name, $type, $start_date_local, $elapsed_time, $description = null, $distance = null)
 {
     try {
         return $this->service->createActivity($name, $type, $start_date_local, $elapsed_time, $description, $distance);
     } catch (ServiceException $e) {
         throw new ClientException('[SERVICE] ' . $e->getMessage());
     }
 }