Class: Twitch::StreamMarkerResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/twitch/stream_marker.rb

Overview

The response envelope for the “Get Stream Markers” endpoint.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ StreamMarkerResponse

Returns a new instance of StreamMarkerResponse.



31
32
33
34
35
# File 'lib/twitch/stream_marker.rb', line 31

def initialize(attributes = {})
  @user_id = attributes['user_id']
  @user_name = attributes['user_name']
  @videos = attributes['videos'].map { |video| VideoStreamMarkers.new(video) }
end

Instance Attribute Details

#user_idObject (readonly)

Returns the value of attribute user_id.



29
30
31
# File 'lib/twitch/stream_marker.rb', line 29

def user_id
  @user_id
end

#user_nameObject (readonly)

Returns the value of attribute user_name.



29
30
31
# File 'lib/twitch/stream_marker.rb', line 29

def user_name
  @user_name
end

#videosObject (readonly)

Returns the value of attribute videos.



29
30
31
# File 'lib/twitch/stream_marker.rb', line 29

def videos
  @videos
end