Skip to content

Commit

Permalink
Merge pull request #28 from KWcDP6hz3/add-segmentStream
Browse files Browse the repository at this point in the history
Added segmentStream method to Strava class
  • Loading branch information
RichieMcMullen authored Nov 24, 2021
2 parents 0db080f + bfe0f86 commit 4e4b849
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Strava.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,21 @@ public function segmentEffort($token, $segmentID)
return $res;
}


#
# Strava Activity Segment Stream
#
public function segmentStream($token, $segmentID, $keys = '', $keyByType = true)
{
if ($keys != '')
$keys = join(",", $keys);

$url = $this->strava_uri . '/segments/'. $segmentID .'/streams?keys='. $keys .'&key_by_type'. $keyByType;
$config = $this->bearer($token);
$res = $this->get($url, $config);
return $res;
}


#
# Strava List Starred Segments
Expand Down

0 comments on commit 4e4b849

Please sign in to comment.