Class: Twitch::StreamMarker

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

Overview

A point of time in a stream VOD that was marked while it is live.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ StreamMarker

Returns a new instance of StreamMarker.



18
19
20
21
22
23
24
# File 'lib/twitch/stream_marker.rb', line 18

def initialize(attributes = {})
  @id = attributes['id']
  @created_at = attributes['created_at']
  @description = attributes['description']
  @position_seconds = attributes['position_seconds']
  @url = attributes['URL']
end

Instance Attribute Details

#created_atObject (readonly)

Date at which the stream marker was created.



9
10
11
# File 'lib/twitch/stream_marker.rb', line 9

def created_at
  @created_at
end

#descriptionObject (readonly)

Description of the stream marker.



11
12
13
# File 'lib/twitch/stream_marker.rb', line 11

def description
  @description
end

#idObject (readonly)

ID of the stream marker.



7
8
9
# File 'lib/twitch/stream_marker.rb', line 7

def id
  @id
end

#position_secondsObject (readonly)

Elapsed time in the VOD in seconds at which the stream marker was created.



13
14
15
# File 'lib/twitch/stream_marker.rb', line 13

def position_seconds
  @position_seconds
end

#urlObject (readonly)

URL pointing to the video and timestamp of the stream marker. Not returned upon creation.



16
17
18
# File 'lib/twitch/stream_marker.rb', line 16

def url
  @url
end