Octopus Energy Coffee Checker
.vscode | ||
.editorconfig | ||
.gitignore | ||
.graphqlrc.yml | ||
deno.json | ||
LICENSE | ||
main.ts | ||
README.md | ||
state.ts | ||
webhook.ts |
Octoplus Coffee Check
Octopus Energy give away free coffee to customers each week, but since they started releasing codes every day, rather than at the start of each week, I'm struggling to get them. This is a simple tool that will check for available coffee codes and notify via a webhook.
Usage
Setup a cronjob to run the script with deno run -A main.ts
.
The following environment variables are configurable:
OCTOPUS_API_KEY
- your Octopus Energy API key, available hereOCTOPUS_ACCOUNT_NUMBER
- your Octopus Energy account number (likeA-XXXXXXXX
)WEBHOOK_URL
- a webhook to your messaging service of choice (e.g. Discord, Slack, etc...)STATE_FILENAME
- this sets the location of the script's state. By default it'll bestate.json
in the current working directory.