1.0.0 • Published 2 years ago

@ehnosso/twitchapi v1.0.0

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

Twitch API

Twitch API implementation

Install

$ npm install @ehnosso/twitchapi

or

$ yarn add @ehnosso/twitchapi

Get Keys

Usage

const TwitchApi = require('@ehnosso/twitchapi');
const twitchApi = new TwitchApi('client_id', 'client_secret');

(async () => {
    const broadcaster = await twitchApi.getBroadcaster('ratoborrachudo');
    console.log("broadcaster", broadcaster);

    const channel_info = await twitchApi.getChannelInfo(broadcaster.id);
    console.log("channel_info", channel_info);

    const streams = await twitchApi.getStreamsStatus(broadcaster.id);
    console.log("streams", streams);

    const videos = await twitchApi.getVideos(broadcaster.id);
    console.log("videos", videos);
})();