Skip to content

Instantly share code, notes, and snippets.

@bdenning
Last active March 3, 2016 02:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdenning/9b26ad1f7c0d6df0702e to your computer and use it in GitHub Desktop.
Save bdenning/9b26ad1f7c0d6df0702e to your computer and use it in GitHub Desktop.
Check Toll Online Delivery Status
#!/bin/bash
## A "one-liner hack job" to check the delivery status of my new Galaxy Tab S2 (consignment note changed to hide my address)
## Just running this with "watch -n 1800 check-delivery.sh" will send a notification to my Pebble watch with the delivery status every 30 minutes.
curl -s --data '{"connoteIds":"ATHY214635","systemId":null}' 'https://online.toll.com.au/v1/trackAndTrace/searchConsignments' \
-H 'Host: online.toll.com.au' -H 'Accept: application/json' -H 'Content-Type: application/json' \
| python -c 'import sys,json; print json.load(sys.stdin)["tatConnotes"][0]["progressStatusDesc"]' \
| pushover
## The pushover commandline tool is available from https://github.com/bdenning/pushover.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment