Current section

Files

Jump to
scrapped_twitch_api lib resources chat get_emote_sets.ex
Raw

lib/resources/chat/get_emote_sets.ex

defmodule TwitchApi.Chat.GetEmoteSets do
@moduledoc """
⛔ This module is autogenerated please do not modify manually.
## Example request from twitch api docs:
### descriptions:
This example gets the emotes for the TwitchDev subscriber emote set.
### requests:
curl -X GET 'https://api.twitch.tv/helix/chat/emotes/set?emote_set_id=301590448'
-H'Authorization: Bearer cfabdegwdoklmawdzdo98xt2fo512y'
-H'Client-Id: uo6dggojyb8d6soh92zknwmi5ej1q2'
## Example response from twitch api docs:
### descriptions:
### responses:
{"data":[{"id":"304456832","name":"twitchdevPitchfork","images":{"url_1x":"https://static-cdn.jtvnw.net/emoticons/v2/304456832/static/light/1.0","url_2x":"https://static-cdn.jtvnw.net/emoticons/v2/304456832/static/light/2.0","url_4x":"https://static-cdn.jtvnw.net/emoticons/v2/304456832/static/light/3.0"},"emote_type":"subscriptions","emote_set_id":"301590448","owner_id":"141981764","format":["static"],"scale":["1.0","2.0","3.0"],"theme_mode":["light","dark"]},...],"template":"https://static-cdn.jtvnw.net/emoticons/v2/{{id}}/{{format}}/{{theme_mode}}/{{scale}}"}
# Twithc CLI example that gets the emotes for the specified emote set.
twitch api get /chat/emotes/set -qemote_set_id=301590448
"""
alias TwitchApi.MyFinch
alias TwitchApi.ApiJson.Template.Method.Headers
@doc """
### Description:
NEW Gets emotes for one or more specified emote sets.
### Required authentication:
### Required authorization:
Requires a user or application OAuth access token.
"""
@typedoc """
An ID that identifies the emote set. Include the parameter for each emote set you want to get. For example, emote_set_id=1234&emote_set_id=5678. You may specify a maximum of 25 IDs.
"""
@type emote_set_id :: %{required(:emote_set_id) => String.t()}
@spec call(emote_set_id) :: {:ok, Finch.Response.t()} | {:error, Exception.t()}
def call(%{emote_set_id: emote_set_id}) do
MyFinch.request(
"GET",
"https://api.twitch.tv/helix/chat/emotes/set?emote_set_id=#{emote_set_id}",
Headers.config_headers(),
nil
)
end
end