Skip to content

Instantly share code, notes, and snippets.

@ngs
Created December 27, 2016 11:42
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 ngs/cc38361a7a9030abf57e31b4e5f2b3bf to your computer and use it in GitHub Desktop.
Save ngs/cc38361a7a9030abf57e31b4e5f2b3bf to your computer and use it in GitHub Desktop.
#!/bin/bash
STORES=$(curl -s http://www.apple.com/jp/shop/retail/pickup-message\?parts.0\=MMEF2J%2FA\&location\=100-0001 | jq -r '.body.stores | .[] | select(.partsAvailability["MMEF2J/A"].storePickupQuote | contains("2017/02") | not) | .storeName' | tr '\n' ',')
[[ $STORES == '' ]] || curl -XPOST -d "payload={\"text\":\"${STORES}\"}" $SLACK_WEBHOOK_URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment