Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cautious-meme.drawio

Twitch API integration client for Node.js, wrapping the Twitch Helix API.

Features

  • Authentication – App access token management with automatic caching and expiry
  • Streams – List live streams, look up by user/game, followed streams
  • Channels – Channel info, search, modify settings, list editors
  • Chat – Chat settings, chatters, messages, badges, emotes
  • Users – User lookup by ID/login, followed channels, block lists

Setup

npm install

Create a .env file (see .env.example):

TWITCH_CLIENT_ID=your_client_id
TWITCH_CLIENT_SECRET=your_client_secret

Get credentials from the Twitch Developer Console.

Usage

const { TwitchClient } = require('./src');

const client = new TwitchClient();

// Search channels
const results = await client.channels.searchChannels('minecraft', { liveOnly: true });

// Get a user
const user = await client.users.getUserByLogin('twitchdev');

// Get live streams
const streams = await client.streams.getStreams({ first: 10 });

Tests

npm test

Runs all unit tests with coverage report.

About

email thru cyclone maze

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages