Giter Club home page Giter Club logo

emotelib's Introduction

EmoteLib
zulul vi von

Node.js library for getting global emotes as well as channel emotes.
It supports 4 providers:

Installation guide:

  1. Install the library from Node Package Manager:
$ npm i emotelib

Usage:

Initialization:

import EmoteLib from "emotelib";

// "client_id" and "access_token" are needed to convert the username into a user ID.
const emotes = new EmoteLib({
    client_id: "123456789abcdef",
    access_token: "123456789abcdef"
});

Get the channel emotes:

// Getting the channel emotes by name:
console.log(await emotes.twitch.getChannelEmotes("ilotterytea"));

console.log(await emotes.betterttv.getChannelEmotes("ilotterytea"));

console.log(await emotes.frankerfacez.getChannelEmotes("ilotterytea"));

console.log(await emotes.seventv.getChannelEmotes("ilotterytea"));

// Also, you can get the channel emotes by user ID:
// NOTE: Entering the user ID as a number will cause an error. Make it a string.
console.log(await emotes.twitch.getChannelEmotes("191400264"));

console.log(await emotes.betterttv.getChannelEmotes("191400264"));

console.log(await emotes.frankerfacez.getChannelEmotes("191400264"));

console.log(await emotes.seventv.getChannelEmotes("191400264"));

Get the global emotes:

console.log(await emotes.twitch.getGlobalEmotes());

console.log(await emotes.betterttv.getGlobalEmotes());

console.log(await emotes.frankerfacez.getGlobalEmotes());

console.log(await emotes.seventv.getGlobalEmotes());

Dependencies:

  • Axios (used to send requests to the API. In the future it will be replaced by the built-in XMLHttpRequest).

emotelib's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.