jskraken
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

jsKraken

NPM version Pipeline Status Coverage Status Sonarcloud Status Dependency Status Dev Dependency Status

jsKraken is a Typescript wrapper to the Twitch Kraken API.

Requirements

Documentation

Getting Started

If you are using Node.js, install jsKraken using npm:

$ npm install jskraken

You can now require and use jskraken like so:

import jsKraken from "jskraken";
 
const TWITCH_CLIENT = process.env.TWITCH_CLIENT;
const TWITCH_TOKEN = process.env.TWITCH_TOKEN;
 
const kapi = jsKraken(TWITCH_CLIENT!, TWITCH_TOKEN);
 
kapi
  .getCurrentUser()
  .then((user) => {
    kapi
      .getUserFollows(user.data!._id)
      .then((data) => {
        console.log(data);
      })
      .catch((err) => console.log(err));
  })
  .catch((err) => console.log(err));

Refer to the Kraken API Documentation and the jsKraken Example for more information.

Browser

You can also load this script on your browser like so:

<script src="https://cdn.jsdelivr.net/npm/jskraken/dist/bundle.js"></script>

You can now use jsKraken normally on the page, like you would on Node.js.

License

jsKraken - Helix API Javascript Library.
Copyright (C) 2019  Guilherme Caulada (Sighmir)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Readme

Keywords

Package Sidebar

Install

npm i jskraken

Weekly Downloads

1

Version

2.0.1

License

GPL-3.0

Unpacked Size

185 kB

Total Files

19

Last publish

Collaborators

  • sighmir