Class: Twitch::Channel

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

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Channel

Returns a new instance of Channel.



40
41
42
43
44
# File 'lib/twitch/channel.rb', line 40

def initialize(attributes = {})
  attributes.each do |key, value|
    instance_variable_set "@#{key}", value
  end
end

Instance Attribute Details

#broadcaster_idObject (readonly)

Twitch User ID of this channel owner.



8
9
10
# File 'lib/twitch/channel.rb', line 8

def broadcaster_id
  @broadcaster_id
end

#broadcaster_languageObject (readonly)

Language of the channel. A language value is either the ISO 639-1 two-letter code for a supported stream language or “other”.



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

def broadcaster_language
  @broadcaster_language
end

#broadcaster_loginObject (readonly)

Broadcaster’s user login name.



10
11
12
# File 'lib/twitch/channel.rb', line 10

def 
  @broadcaster_login
end

#broadcaster_nameObject (readonly)

Twitch user display name of this channel owner.



12
13
14
# File 'lib/twitch/channel.rb', line 12

def broadcaster_name
  @broadcaster_name
end

#delayObject (readonly)

Stream delay in seconds.



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

def delay
  @delay
end

#display_nameObject (readonly)

Returns the value of attribute display_name.



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

def display_name
  @display_name
end

#game_idObject (readonly)

Current game ID being played on the channel .



18
19
20
# File 'lib/twitch/channel.rb', line 18

def game_id
  @game_id
end

#game_nameObject (readonly)

Name of the game being played on the channel.



20
21
22
# File 'lib/twitch/channel.rb', line 20

def game_name
  @game_name
end

#idObject (readonly)

Some endpoints, like “Search Channels”, can return different fields



27
28
29
# File 'lib/twitch/channel.rb', line 27

def id
  @id
end

#is_liveObject (readonly)

A Boolean value that determines whether the broadcaster is streaming live. Is true if the broadcaster is streaming live; otherwise, false.



31
32
33
# File 'lib/twitch/channel.rb', line 31

def is_live
  @is_live
end

#started_atObject (readonly)

The UTC date and time (in RFC3339 format) of when the broadcaster started streaming. The string is empty if the broadcaster is not streaming live.



38
39
40
# File 'lib/twitch/channel.rb', line 38

def started_at
  @started_at
end

#tagsObject (readonly)

The tags applied to the channel.



33
34
35
# File 'lib/twitch/channel.rb', line 33

def tags
  @tags
end

#thumbnail_urlObject (readonly)

A URL to a thumbnail of the broadcaster’s profile image.



35
36
37
# File 'lib/twitch/channel.rb', line 35

def thumbnail_url
  @thumbnail_url
end

#titleObject (readonly)

Title of the stream.



22
23
24
# File 'lib/twitch/channel.rb', line 22

def title
  @title
end