Current section
Files
Jump to
Current section
Files
lib/resources/bits/get_cheermotes.ex
defmodule TwitchApi.Bits.GetCheermotes do
@moduledoc """
⛔ This module is autogenerated please do not modify manually.
## Example request from twitch api docs:
### descriptions:
This request lists all global Cheermotes.
This request lists all global Cheermotes and any Cheermote uploaded by this broadcaster.
### requests:
curl -X GET 'https://api.twitch.tv/helix/bits/cheermotes?broadcaster_id=41245072'
-H'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx'
-H'Client-Id: wbmytr93xzw8zbg0p1izqyzzc5mbiz'
curl -X GET 'https://api.twitch.tv/helix/bits/cheermotes'
-H'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx'
-H'Client-Id: wbmytr93xzw8zbg0p1izqyzzc5mbiz'
## Example response from twitch api docs:
### descriptions:
### responses:
{"data":[{"prefix":"Cheer","tiers":[{"min_bits":1,"id":"1","color":"#979797","images":{"dark":{"animated":{"1":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/animated/1/1.gif","1.5":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/animated/1/1.5.gif","2":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/animated/1/2.gif","3":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/animated/1/3.gif","4":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/animated/1/4.gif"},"static":{"1":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/static/1/1.png","1.5":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/static/1/1.5.png","2":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/static/1/2.png","3":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/static/1/3.png","4":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/static/1/4.png"}},"light":{"animated":{"1":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/animated/1/1.gif","1.5":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/animated/1/1.5.gif","2":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/animated/1/2.gif","3":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/animated/1/3.gif","4":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/animated/1/4.gif"},"static":{"1":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/static/1/1.png","1.5":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/static/1/1.5.png","2":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/static/1/2.png","3":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/static/1/3.png","4":"https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/static/1/4.png"}}},"can_cheer":true,"show_in_bits_card":true}...],"type":"global_first_party","order":1,"last_updated":"2018-05-22T00:06:04Z","is_charitable":false},...]}
"""
alias TwitchApi.MyFinch
alias TwitchApi.ApiJson.Template.Method.Headers
@doc """
### Description:
Retrieves the list of available Cheermotes, animated emotes to which viewers can assign Bits, to cheer in chat. Cheermotes returned are available throughout Twitch, in all Bits-enabled channels.
### Required authentication:
OAuth or App Access Token required.
### Required authorization:
"""
@typedoc """
ID for the broadcaster who might own specialized Cheermotes.
"""
@type broadcaster_id :: %{required(:broadcaster_id) => String.t()}
@spec call(broadcaster_id) :: {:ok, Finch.Response.t()} | {:error, Exception.t()}
def call(%{broadcaster_id: broadcaster_id}) do
MyFinch.request(
"GET",
"https://api.twitch.tv/helix/bits/cheermotes?broadcaster_id=#{broadcaster_id}",
Headers.config_headers(),
nil
)
end
end