Last active
August 29, 2015 14:07
-
-
Save matsu-chara/30658d7f15c569e1298e to your computer and use it in GitHub Desktop.
各種webAPI用の関数
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
# yoを送信 | |
function yo() { | |
[[ -n "$1" ]] && youser="$1" || youser='<default_yo_target_user_name>' | |
curl -s \ | |
-d "api_token=<api-token>" \ | |
-d "username=$youser" \ | |
http://api.justyo.co/yo/ | |
} | |
# pushoverで通知を送信 | |
function pushover() { | |
curl -s \ | |
-d "token=<token>" \ | |
-d "user=<user_token>" \ | |
-d "message=$1" \ | |
https://api.pushover.net/1/messages.json | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment