Socket
Socket
Sign inDemoInstall

simple-twitch-api

Package Overview
Dependencies
65
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    simple-twitch-api

Simple module to use to interact with the twitch Api


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

SIMPLE TWITCH API


NPM version NPM downloads Snyk Vulnerabilities for npm package Snyk Vulnerabilities for npm package Snyk Vulnerabilities for npm package

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.

Keywords

FAQs

Last updated on 10 Feb 2022

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc