class Twitch::Stream

A user's broadcasting session.

Constants

DATE_ATTRIBUTES

Fields to be converted from ISO 8601 string to a typed date.

Attributes

community_ids[R]

Associated community IDs for the broadcaster.

game_id[R]

ID of the game being broadcast.

id[R]

ID of the stream.

language[R]

Language of the broadcast.

started_at[R]

Date at which the broadcast started.

thumbnail_url[R]

URL of the latest thumbnail image for the broadcast.

title[R]

Title of the stream session.

type[R]

The type of broadcast which may include 'live', 'playlist', or 'watch_party'.

user_id[R]

ID of the user broadcasting.

user_name[R]

Username of the user broadcasting.

viewer_count[R]

Concurrent viewer count of the broadcast.

Public Class Methods

new(attributes = {}) click to toggle source
# File lib/twitch/stream.rb, line 34
def initialize(attributes = {})
  attributes.each do |k, v|
    if DATE_ATTRIBUTES.include?(k.to_sym)
      instance_variable_set("@#{k}", Time.parse(v))
    else
      instance_variable_set("@#{k}", v)
    end
  end
end