Permalink
Browse files

Adding Streams class to wrap stream data.

  • Loading branch information...
1 parent fc551b9 commit be8a96677976ccc869fc8cb167263b9d5869361c @anolson committed Mar 27, 2011
Showing with 22 additions and 0 deletions.
  1. +1 −0 lib/strava-api.rb
  2. +21 −0 lib/strava-api/streams.rb
View
@@ -9,6 +9,7 @@
require 'strava-api/ride'
require 'strava-api/segment'
require 'strava-api/effort'
+require 'strava-api/streams'
module StravaApi
#everything now in independent class files
View
@@ -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.