2.3.1 • Published 7 years ago

@mocivnik10/easy-twitch v2.3.1

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

@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()
2.3.1

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.0

7 years ago