New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mocivnik10/easy-twitch

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mocivnik10/easy-twitch

  • 2.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 24 Oct 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc