Created
June 5, 2016 12:51
-
-
Save osapon/4b09614eeced41c55c97d84114929253 to your computer and use it in GitHub Desktop.
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
put_slack() { | |
channel_id=`curl -s "https://slack.com/api/im.open" --data "token=${slack_team_key}" --data "user=${slack_user_id}" --data "pretty=1" | jq -r ".channel.id"` | |
curl -s 'https://slack.com/api/chat.postMessage' \ | |
--data "token=${slack_team_key}" \ | |
--data "channel=${channel_id}" \ | |
--data "pretty=1" \ | |
--data-urlencode "text=$1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment