Start on Heroku: PHP

by m3g4mInD

GitHub Readme.md

Apex Legends nightbot

Apex Legends chat command for any Twitch.tv bot that has a an URI fetch command system.

Works with: Nightbot, Ankhbot, Deepbot, Phantombot and probably more unknown.

Apex Legends Twitch streamers, this is a PHP script that uses the API statistics and gathers end-points of the Apex Legends Rank stats and forwards them to Nightbot.

This server-side script is making use of Nightbot's dynamic response system (mostly $(urlfetch)) with which you are able to fetch the resources forwarded by my Heroku App.

Do not worry! Nothing is saved server-side.

How to add commands to Nightbot

With chat:
"!commands add !command_name command_response"
With interface:
https://beta.nightbot.tv/commands/custom

Deployment to Heroku

replace $apikey = ''; in apexstats.php your api key. GET API KEY HERE

replace $platform = ''; with X1, PC, or PS4

replace $player = ''; with your username

$ git init
$ git add -A
$ git commit -m "Initial commit"

$ heroku create
$ git push heroku master

$ heroku run python manage.py migrate

See also, a ready-made application, ready to deploy.

or fork this repo and press

Deploy to Heroku

Credit

Giuthub https://github.com/HugoDerave/ApexLegendsAPI

Discord https://discord.gg/TZ4Y9EB