peterhanania / twitchx

Super-powered TypeScript Twitch REST API wrapper.

Home Page:https://cursorsdottsx.github.io/twitchx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Banner

twitchx

Super-powered TypeScript Twitch REST API wrapper.

About

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

Installation and Usage

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";

Example

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);
})();

Links

Contributing

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.

Help

If you don't understand something or have trouble creating a feature with twitchx, hop in our Discord and ask away!

Package scripts

  • watch – Compiles TypeScript source when a file is changed.
  • test – Runs tests against the library.
  • docs – Generates a data.json with all the gathered JSDoc (runs when a file is changed).
  • md – Generates a docs.json with all the markdown files (runs when an markdown file is changed).
  • build – Compiles TypeScript source.
  • deploy – Update website.

About

Super-powered TypeScript Twitch REST API wrapper.

https://cursorsdottsx.github.io/twitchx

License:MIT License


Languages

Language:TypeScript 100.0%