Skip to content

Instantly share code, notes, and snippets.

@chriskearney
Created September 21, 2016 17:33
Show Gist options
  • Save chriskearney/95279f9155bdc4fa4d52edc8d9782912 to your computer and use it in GitHub Desktop.
Save chriskearney/95279f9155bdc4fa4d52edc8d9782912 to your computer and use it in GitHub Desktop.
#!/bin/sh
getinfo () {
MODEL=$1
ZIP=$2
curl http://www.apple.com/shop/retail/pickup-message\?parts.0\=${MODEL}\&location\=${ZIP}\&little\=true\&cppart\=ATT%2FUS 2>/dev/null | python -m json.tool | grep pickupDisplay
}
echo "7 Plus 256gb GOLD"
getinfo MN5D2LL%2FA 97034
echo "7 Plus 128gb GOLD"
getinfo MN552LL%2FA 97034
echo "7 Plus 256gb BLACK"
getinfo MN592LL%2FA 97034
echo "7 Plus 128gb BLACK"
getinfo MN522LL%2FA 97034
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment