@mocivnik10/easy-twitch
Last updated 2 years ago by mocivnik10 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @mocivnik10/easy-twitch 
SYNC missed versions from official npm registry.

@mocivnik10/easy-twitch

GitHub license

Install

$ npm install @mocivnik10/easy-twitch 

Twitch Client ID

To make API calls, you need a client ID. Create one by following the guide here:

Example Usage

const CLIENT_ID = 'YOUR_KEY_HERE'

const EasyTwitch = require('@mocivnik10/easy-twitch')
const api = new EasyTwitch(CLIENT_ID);

const chalk = require('chalk');

main = async () => {
  const games = await api.games()
  console.log(chalk.yellow("CURRENTLY TOP GAMES"))
  console.log("-------------")
  games.forEach((item, _) => {
    console.log(item.name)
  })
  console.log()

  const topGame = games[0]
  const streamers = await api.streamers(topGame.id)

  console.log(chalk.yellow("TOP GAME: " + topGame.name))
  console.log("-------------")

  streamers.forEach((item, _) => {
    console.log(item.user_name + " - " + item.viewer_count + " viewers")
  })
}

main()

Current Tags

  • 2.3.1                                ...           latest (2 years ago)

6 Versions

  • 2.3.1                                ...           2 years ago
  • 2.3.0                                ...           2 years ago
  • 2.2.0                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 5
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |