Last active
March 3, 2016 02:43
-
-
Save bdenning/9b26ad1f7c0d6df0702e to your computer and use it in GitHub Desktop.
Check Toll Online Delivery Status
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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