Class: Twitch::StreamMarker
- Inherits:
-
Object
- Object
- Twitch::StreamMarker
- 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
-
#created_at ⇒ Object
readonly
Date at which the stream marker was created.
-
#description ⇒ Object
readonly
Description of the stream marker.
-
#id ⇒ Object
readonly
ID of the stream marker.
-
#position_seconds ⇒ Object
readonly
Elapsed time in the VOD in seconds at which the stream marker was created.
-
#url ⇒ Object
readonly
URL pointing to the video and timestamp of the stream marker.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ StreamMarker
constructor
A new instance of StreamMarker.
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_at ⇒ Object (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 |
#description ⇒ Object (readonly)
Description of the stream marker.
9 10 11 |
# File 'lib/twitch/stream_marker.rb', line 9 def description @description end |
#id ⇒ Object (readonly)
ID of the stream marker.
5 6 7 |
# File 'lib/twitch/stream_marker.rb', line 5 def id @id end |
#position_seconds ⇒ Object (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 |
#url ⇒ Object (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 |