2.1.1 • Published 2 years ago

simple-twitch-api v2.1.1

Weekly downloads
10
License
MIT
Repository
github
Last release
2 years ago

A simpler way to interact with the Twitch API (helix version : https://dev.twitch.tv/docs/api/reference) write in Typescript

Roadmap :

  • TypeScript Support
  • Basic Get and Events
  • All Get requests
  • All EventSub
  • All Posts Request
  • All Put Request

Support :

- ES5
- ES6
- typescript (you don't need to install another package to work with TS).

Install

$	npm install simple-twitch-api
$	yarn add simple-twitch-api

Example

import Twitch from 'simple-twitch-api';
import { CLIENT_ID, CLIENT_SECRET } from "./config.json";

const SCOPES = "user:read:email";

async function script() {
    const request = await twitch.getToken(CLIENT_ID, CLIENT_SECRET, SCOPES);

    const token = request.access_token;

    const client = new twitch.default({
        twitch_client_id: CLIENT_ID,
        token: token
    });

    const get_streams = await client.stream.fetch({
        user_login: [
            "alex_off"
        ]
    })

   console.table(get_streams.data);
}

script()

Maintainers

License

MIT License.

2.0.3

2 years ago

2.1.1

2 years ago

2.0.2

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.8.1

3 years ago

1.8.8

3 years ago

1.8.5

3 years ago

1.6.5

3 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.10.20

4 years ago

0.10.1-0.1

4 years ago

0.10.10

4 years ago