Skip to content

API that fetches Twitch emotes from various providers (Twitch, 7TV, BTTV, FFZ).

Notifications You must be signed in to change notification settings

CrippledByte/emotes-api

Repository files navigation

emotes-api

Fetches Twitch emotes from various providers (Twitch, 7TV, BTTV, FFZ).

Clang analysis

Endpoints

  • /v1/channel/<username>/<provider>
  • /v1/global/<provider>

Available providers: twitch, 7tv, bttv, ffz, all.

Output

[
  {
    "animated": false,
    "code": "FeelsDankMan",
    "provider": 1,
    "urls": [
      {
        "size": "1x",
        "url": "https://cdn.7tv.app/emote/63071bb9464de28875c52531/1x.webp"
      },
      {
        "size": "2x",
        "url": "https://cdn.7tv.app/emote/63071bb9464de28875c52531/2x.webp"
      },
      {
        "size": "3x",
        "url": "https://cdn.7tv.app/emote/63071bb9464de28875c52531/3x.webp"
      },
      {
        "size": "4x",
        "url": "https://cdn.7tv.app/emote/63071bb9464de28875c52531/4x.webp"
      }
    ],
    "zero_width": false
  },
]

Providers

id Provider
0 Twitch
1 7TV
2 BTTV
3 FFZ

Setup

  1. Register an app on dev.twitch.tv and enter the client ID and secret in .env.
  2. Install requirements:
mkdir env
virtualenv env
source env/bin/activate
pip3 install -r requirements.txt
  1. Run the server:
gunicorn --preload --bind 0.0.0.0:8000 app:app

Development

  • Running unit tests:
python3 -m unittest