There are unpopular Twitch video game categories that can go for weeks or months without seeing a live streamer. This program sends a notification to your Amazon Echo device when a streamer begins live streaming your favorite obscure video game.
The intention of this program is to handpick Twitch games that have little to no activity, and to be notified when a streamer begins to live stream that game.
- Server that runs PHP
- Cron Job
- A registered Twitch app
- Amazon Echo device
- Notify Me Alexa Skill installed on Amazon Echo
- Clone or download this repository to your system
- From the command line, navigate to project directory
cd /path/to/dir/twitch-unpopular-game-notify
- Run
composer install
. If Composer is not installed on your system, you can get Composer here. - Open config.php file and set your options and save
- Upload the project directory 'twitch-unpopular-game-notify' to your server
- Cron Job Setup
Set your timezone. Timezone parameters can be found here.
date_default_timezone_set('America/Chicago');
Set the Array of Twitch categories you want to follow for notifications. The category ID (in this example 1234) can be obtained from the Twitch API or by viewing the source JSON response from a Twitch category page.
const TWITCH_CATEGORIES = [
1234 => 'Example Game Name',
9876 => 'Example Game Name 2',
];
Your registered Twitch Client ID. Twitch provides a Client ID when you register a Twitch app.
define('TWITCH_CLIENT_ID', 'yourClientIDGoesHere');
Your Twitch Secret Token. Twitch provides a Secret Token when you register a Twitch app. Keep this a secret and don't expose to anyone!
define('TWITCH_CLIENT_SECRET_TOKEN', 'yourSecretTokenGoesHere');
Notify Me Alexa Skill
You will receive an access code from Notify Me by following these instructions here
define('NOTIFY_ME_ACCESS_CODE', 'yourNotifyMeAccessCodeGoesHere');
A cron task is required for this program to run. The timing of the cron can be adjusted to your own requirements.
For example, this cron is set to run the program every 5 minutes to check for new streams. Update the example paths below accordingly.
*/5 * * * * cd /your/server/path/to/twitch-unpopular-game-notify && php index.php >/dev/null 2>&1;