Skip to content

Instantly share code, notes, and snippets.

@matsu-chara
Last active August 29, 2015 14:07
Show Gist options
  • Save matsu-chara/30658d7f15c569e1298e to your computer and use it in GitHub Desktop.
Save matsu-chara/30658d7f15c569e1298e to your computer and use it in GitHub Desktop.
各種webAPI用の関数
# 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