Skip to content

Instantly share code, notes, and snippets.

@ex-hota911
Last active November 8, 2015 02:31
Show Gist options
  • Select an option

  • Save ex-hota911/9027c34a35e7718530c5 to your computer and use it in GitHub Desktop.

Select an option

Save ex-hota911/9027c34a35e7718530c5 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Variables:
# JALAN_API_KEY - API key of Jalan web service
# Visit https://www.jalan.net/jw/jwp0400/jww0401.do to get new key.
# TO_ADDRES - The address to send mails.
URL="http://jws.jalan.net/APIAdvance/StockSearch/V1/?key=${JALAN_API_KEY}&stay_date=20151121&stay_count=1&room_count=1&adult_num=2&s_area=192002"
set -eux
( echo ${URL}; curl ${URL} ) | mail -s "Kanazawa no hotel" ${TO_ADDRESS}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment