class Twitch::Emotes

Attributes

emote_set_id[RW]
emote_type[RW]
id[RW]
images[RW]
name[RW]
owner_id[RW]
tier[RW]

Public Class Methods

get_channel(id) click to toggle source

Gets Emotes for a channel ID

# File lib/twitch/emotes.rb, line 23
def get_channel(id)
  response = Twitch.client.get(:helix, "chat/emotes?broadcaster_id=#{id}")

  emote_array(response["data"])
end
get_emote_set(id) click to toggle source

Gets Emotes for an Emote Set ID

# File lib/twitch/emotes.rb, line 37
def get_emote_set(id)
  response = Twitch.client.get(:helix, "chat/emotes/set?emote_set_id=#{id}")

  emote_array(response["data"])
end
get_global() click to toggle source

Gets Global Emotes

# File lib/twitch/emotes.rb, line 30
def get_global
  response = Twitch.client.get(:helix, "chat/emotes/global")

  emote_array(response["data"])
end

Private Class Methods

emote_array(data) click to toggle source
# File lib/twitch/emotes.rb, line 45
def emote_array(data)
  emotes = []

  data.each do |e|
    emotes << new(e)
  end

  emotes
end

Public Instance Methods

url_1x() click to toggle source
# File lib/twitch/emotes.rb, line 8
def url_1x
  images["url_1x"]
end
url_2x() click to toggle source
# File lib/twitch/emotes.rb, line 12
def url_2x
  images["url_2x"]
end
url_4x() click to toggle source
# File lib/twitch/emotes.rb, line 16
def url_4x
  images["url_4x"]
end