Class: Twitch::Stream

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

Overview

A user’s broadcasting session.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_idsObject (readonly)

Associated community IDs for the broadcaster.



19
20
21
# File 'lib/twitch/stream.rb', line 19

def community_ids
  @community_ids
end

#game_idObject (readonly)

ID of the game being broadcast.



15
16
17
# File 'lib/twitch/stream.rb', line 15

def game_id
  @game_id
end

#game_nameObject (readonly)

Name of the game being broadcast.



17
18
19
# File 'lib/twitch/stream.rb', line 17

def game_name
  @game_name
end

#idObject (readonly)

ID of the stream.



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

def id
  @id
end

#languageObject (readonly)

Language of the broadcast.



30
31
32
# File 'lib/twitch/stream.rb', line 30

def language
  @language
end

#started_atObject (readonly)

Date at which the broadcast started.



28
29
30
# File 'lib/twitch/stream.rb', line 28

def started_at
  @started_at
end

#tag_idsObject (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_urlObject (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

#titleObject (readonly)

Title of the stream session.



24
25
26
# File 'lib/twitch/stream.rb', line 24

def title
  @title
end

#typeObject (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_idObject (readonly)

ID of the user broadcasting.



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

def user_id
  @user_id
end

#user_nameObject (readonly)

Username of the user broadcasting.



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

def user_name
  @user_name
end

#viewer_countObject (readonly)

Concurrent viewer count of the broadcast.



26
27
28
# File 'lib/twitch/stream.rb', line 26

def viewer_count
  @viewer_count
end