Class: Strava::Models::BaseStream

Inherits:
Response show all
Defined in:
lib/strava/models/base_stream.rb

Overview

Represents base stream metadata from the Strava API.

Streams are time-series data for activities such as GPS coordinates, heart rate, power, cadence, etc. The BaseStream provides metadata about how the stream data was sampled and processed.

Examples:

Accessing stream metadata

streams = client.activity_streams(1234567890, keys: 'heartrate,watts')
puts streams.heartrate.original_size  # => 3600
puts streams.heartrate.resolution     # => "high"
puts streams.heartrate.series_type    # => "distance"

See Also:

Instance Method Summary collapse

Instance Method Details

#original_sizeInteger

Returns Total number of data points in the original stream before any resampling.

Returns:

  • (Integer)

    Total number of data points in the original stream before any resampling



24
# File 'lib/strava/models/base_stream.rb', line 24

property 'original_size'

#resolutionString

Returns Resolution of the stream data ("low", "medium", or "high").

Returns:

  • (String)

    Resolution of the stream data ("low", "medium", or "high")



27
# File 'lib/strava/models/base_stream.rb', line 27

property 'resolution'

#series_typeString

Returns Type of series - how data points are indexed ("time" or "distance").

Returns:

  • (String)

    Type of series - how data points are indexed ("time" or "distance")



30
# File 'lib/strava/models/base_stream.rb', line 30

property 'series_type'