Skip to content
This repository has been archived by the owner on Dec 27, 2019. It is now read-only.

Commit

Permalink
Adding Streams class to wrap stream data.
Browse files Browse the repository at this point in the history
  • Loading branch information
anolson committed Mar 27, 2011
1 parent fc551b9 commit be8a966
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/strava-api.rb
Expand Up @@ -9,6 +9,7 @@
require 'strava-api/ride' require 'strava-api/ride'
require 'strava-api/segment' require 'strava-api/segment'
require 'strava-api/effort' require 'strava-api/effort'
require 'strava-api/streams'


module StravaApi module StravaApi
#everything now in independent class files #everything now in independent class files
Expand Down
21 changes: 21 additions & 0 deletions lib/strava-api/streams.rb
@@ -0,0 +1,21 @@
module StravaApi

class Streams < HashBasedStore
ATTRIBUTE_MAP = {
"altitude" => :altitude,
"cadence" => :cadence,
"distance" => :distance,
"heartrate" => :heartrate,
"latlng" => :latlng,
"time" => :time,
"watts" => :watts,
"watts_calc" => :watts_calc
}

NESTED_CLASS_MAP = {}

def initialize(connection, options = {})
super(connection, ATTRIBUTE_MAP, NESTED_CLASS_MAP, options)
end
end #class Streams
end

0 comments on commit be8a966

Please sign in to comment.