Created
February 23, 2015 13:51
-
-
Save loa/3c2cc12838496cc52083 to your computer and use it in GitHub Desktop.
Hipchat Message api v2
This file contains hidden or 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
#!/bin/bash | |
# https://gist.github.com/danriti/7345074 | |
ROOM_ID=1 | |
MESSAGE="$(hostname): $1" | |
AUTH_TOKEN="secret" | |
curl -H "Content-Type: application/json" \ | |
-X POST \ | |
--silent \ | |
-d "{\"color\": \"green\", \"message_format\": \"text\", \"message\": \"$MESSAGE\" }" \ | |
https://api.hipchat.com/v2/room/$ROOM_ID/notification?auth_token=$AUTH_TOKEN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment