twitchx is a versatile Node.js library that lets you use the Twitch API with little overhead. Written completely in TypeScript with accurate typings.
- Object-oriented
- Low overhead
- Fast
- API like discord.js
- 99.99% coverage
Node.js v14 or newer is required.
# Install with NPM:
$ npm install twitchx
# or alternatively, with Yarn:
$ yarn add twitchx
// Available with CommonJS:
const Twitch = require("twitchx");
// or with ESM:
import * as Twitch from "twitchx";
import * as Twitch from "twitchx";
(async () => {
const client = new Twitch.Client({
clientId: "a-cool-id",
clientSecret: "dont-steal-pls",
});
await client.login();
const user = await client.users.fetch("44445592");
console.log(user);
})();
Before opening an issue or contributing, make sure that it hasn't been opened or brought up already, or hasn't been done before/is being done.
Read CONTRIBUTING.md for information on contributing.
Submit a PR to the GitHub repo and have a collaborator review the changes.
If you don't understand something or have trouble creating a feature with twitchx, hop in our Discord and ask away!
watch
– Compiles TypeScript source when a file is changed.test
– Runs tests against the library.docs
– Generates adata.json
with all the gathered JSDoc (runs when a file is changed).md
– Generates adocs.json
with all the markdown files (runs when an markdown file is changed).build
– Compiles TypeScript source.deploy
– Update website.