📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

twitch-drops-watcher

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitch-drops-watcher

Script to periodically scan for Twitch Drops for a given game.

0.0.3
latest
Source
npm
Version published
Weekly downloads
2
-71.43%
Maintainers
1
Weekly downloads
 
Created
Source

Twitch Drops Watcher

Node.js CLI tool to scan for Twitch streams with Drops enabled for a given list of games.

Options

Usage: twitch-drops-watcher [options] <games...>

CLI tool to check for Twitch live streams with Drops Enabled for a given list of games.

Options:
  -V, --version     output the version number
  -d, --drops       only show live streams with Twitch Drops enabled. (default: false)
  -e, --env <path>  path to the .env file to load (default: "./.env")
  -h, --help        display help for command

Game names

The exact name of the videogame you want can be found at https://www.twitch.tv/directory.

Installation

NPM script

You can run it as an NPM script with npx twitch-drops-watcher. See below for configuration.

From source

First, clone the repository from Github, then, install the dependencies with Yarn or NPM, and, finally, compile the code.

git clone git@github.com:Haltarys/Twitch-Drops-Watcher.git
yarn install # npm install
yarn run build # npm run build

Don't forget to add the environment variables to configure the script (see below.)

After installing the dependencies and compiling the code, you can run it with: node dist/index.js or simply node ..

Configuration

For the script to work, it needs some environment variables to be set (see .env.example for details.)

You can either export them directly into your environment like so:

export TWITCH_CLIENT_ID=<Your Twitch client ID>
# ... Do so for all necessary environment variables
node . "Game1" "Game2" # run the script

# Or in one line
TWITCH_CLIENT_ID=<Your Twitch client ID> ... node . "Game1" "Game2"

Or use an .env file like as detailed below (recommended.)

Copy the .env.example file and rename it to .env.

Twitch configuration

Go to https://dev.twitch.tv/console/apps, log into your Twitch account and create a new app. Generate a client ID and secret and save them to the .env file.

Read more at https://dev.twitch.tv/docs/api/get-started.

Google configuration

Go to https://console.cloud.google.com/apis/dashboard, log into your Google account and create a new Cloud project. From that project, create credentials and paste them into the .env file.

Specify the .env file's path with the -e, --env flag (default is ./.env.)

Useful links:

Keywords

twitch

FAQs

Package last updated on 28 Aug 2022

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