Skip to content

Instantly share code, notes, and snippets.

@matsu-chara
Last active Aug 29, 2015
Embed
What would you like to do?
各種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