New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

emotelib

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emotelib

Library for receiving global Twitch emotes as well as Twitch channel emotes. Support for third-party providers is included.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

EmoteLib
zulul vi von

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

Installation guide:

  • 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).

Keywords

twitch

FAQs

Package last updated on 14 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts