Class: Twitch::Stream
- Inherits:
-
Object
- Object
- Twitch::Stream
- Defined in:
- lib/twitch/stream.rb
Overview
A user’s broadcasting session.
Instance Attribute Summary collapse
-
#community_ids ⇒ Object
readonly
Associated community IDs for the broadcaster.
-
#game_id ⇒ Object
readonly
ID of the game being broadcast.
-
#game_name ⇒ Object
readonly
Name of the game being broadcast.
-
#id ⇒ Object
readonly
ID of the stream.
-
#language ⇒ Object
readonly
Language of the broadcast.
-
#started_at ⇒ Object
readonly
Date at which the broadcast started.
-
#tag_ids ⇒ Object
readonly
Ids of tags on the live stream.
-
#thumbnail_url ⇒ Object
readonly
URL of the latest thumbnail image for the broadcast.
-
#title ⇒ Object
readonly
Title of the stream session.
-
#type ⇒ Object
readonly
The type of broadcast which may include ‘live’, ‘playlist’, or ‘watch_party’.
-
#user_id ⇒ Object
readonly
ID of the user broadcasting.
-
#user_name ⇒ Object
readonly
Username of the user broadcasting.
-
#viewer_count ⇒ Object
readonly
Concurrent viewer count of the broadcast.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Stream
constructor
A new instance of Stream.
Constructor Details
#initialize(attributes = {}) ⇒ Stream
Returns a new instance of Stream.
36 37 38 39 40 |
# File 'lib/twitch/stream.rb', line 36 def initialize(attributes = {}) attributes.each do |key, value| instance_variable_set "@#{key}", value end end |
Instance Attribute Details
#community_ids ⇒ Object (readonly)
Associated community IDs for the broadcaster.
19 20 21 |
# File 'lib/twitch/stream.rb', line 19 def community_ids @community_ids end |
#game_id ⇒ Object (readonly)
ID of the game being broadcast.
15 16 17 |
# File 'lib/twitch/stream.rb', line 15 def game_id @game_id end |
#game_name ⇒ Object (readonly)
Name of the game being broadcast.
17 18 19 |
# File 'lib/twitch/stream.rb', line 17 def game_name @game_name end |
#id ⇒ Object (readonly)
ID of the stream.
9 10 11 |
# File 'lib/twitch/stream.rb', line 9 def id @id end |
#language ⇒ Object (readonly)
Language of the broadcast.
30 31 32 |
# File 'lib/twitch/stream.rb', line 30 def language @language end |
#started_at ⇒ Object (readonly)
Date at which the broadcast started.
28 29 30 |
# File 'lib/twitch/stream.rb', line 28 def started_at @started_at end |
#tag_ids ⇒ Object (readonly)
Ids of tags on the live stream
34 35 36 |
# File 'lib/twitch/stream.rb', line 34 def tag_ids @tag_ids end |
#thumbnail_url ⇒ Object (readonly)
URL of the latest thumbnail image for the broadcast.
32 33 34 |
# File 'lib/twitch/stream.rb', line 32 def thumbnail_url @thumbnail_url end |
#title ⇒ Object (readonly)
Title of the stream session.
24 25 26 |
# File 'lib/twitch/stream.rb', line 24 def title @title end |
#type ⇒ Object (readonly)
The type of broadcast which may include ‘live’, ‘playlist’, or ‘watch_party’.
22 23 24 |
# File 'lib/twitch/stream.rb', line 22 def type @type end |
#user_id ⇒ Object (readonly)
ID of the user broadcasting.
11 12 13 |
# File 'lib/twitch/stream.rb', line 11 def user_id @user_id end |
#user_name ⇒ Object (readonly)
Username of the user broadcasting.
13 14 15 |
# File 'lib/twitch/stream.rb', line 13 def user_name @user_name end |
#viewer_count ⇒ Object (readonly)
Concurrent viewer count of the broadcast.
26 27 28 |
# File 'lib/twitch/stream.rb', line 26 def viewer_count @viewer_count end |