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



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

def initialize(attributes = {})
  @id = attributes['id']
  @created_at = Time.parse(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.



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

def created_at
  @created_at
end

#descriptionObject (readonly)

Description of the stream marker.



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

def description
  @description
end

#idObject (readonly)

ID of the stream marker.



5
6
7
# File 'lib/twitch/stream_marker.rb', line 5

def id
  @id
end

#position_secondsObject (readonly)

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



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

def position_seconds
  @position_seconds
end

#urlObject (readonly)

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



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

def url
  @url
end