Skip to content

Instantly share code, notes, and snippets.



Last active Dec 19, 2015
What would you like to do?
Ruby methods to publish content into some chat systems. No API clients or gems required, just curl.
# Publish messages to Hipchat
def publish_to_hipchat(room_id, msg, from, format, color, auth_token)
`curl -X POST -d "room_id=#{room_id}&message=#{msg}&from=#{from}&message_format=#{format}&color=#{color}" \
# Publish messages to Talker
def publish_to_talker(room_id, msg, auth_token)
`curl -H 'Accept: application/json' -H 'Content-Type: application/json' \
-H 'X-Talker-Token: "#{auth_token}"' \
-d '{"message":"#{msg}"}' \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.