Module for sending messages to hipchat.
New in version 2015.5.0.
configuration: | This module can be used by either passing an api key and version directly or by specifying both in a configuration profile in the salt master/minion config. It is possible to use a different API than http://api.hipchat.com, by specifying the API URL in config as api_url, or by passing the value directly. For example: hipchat:
api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
api_version: v1
Custom API Example: hipchat:
api_url: http://api.hipchat.myteam.com
api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
api_version: v2
|
---|
salt.modules.hipchat.
find_room
(name, api_url=None, api_key=None, api_version=None)¶Find a room by name and return it.
Parameters: |
|
---|---|
Returns: | The room object. |
CLI Example:
salt '*' hipchat.find_room name="Development Room"
salt '*' hipchat.find_room name="Development Room" api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15 api_version=v1
salt.modules.hipchat.
find_user
(name, api_url=None, api_key=None, api_version=None)¶Find a user by name and return it.
Parameters: |
|
---|---|
Returns: | The user object. |
CLI Example:
salt '*' hipchat.find_user name="Thomas Hatch"
salt '*' hipchat.find_user name="Thomas Hatch" api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15 api_version=v1
salt.modules.hipchat.
list_rooms
(api_url=None, api_key=None, api_version=None)¶List all HipChat rooms.
Parameters: |
|
---|---|
Returns: | The room list. |
CLI Example:
salt '*' hipchat.list_rooms
salt '*' hipchat.list_rooms api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15 api_version=v1
salt.modules.hipchat.
list_users
(api_url=None, api_key=None, api_version=None)¶List all HipChat users.
Parameters: |
|
---|---|
Returns: | The user list. |
CLI Example:
salt '*' hipchat.list_users
salt '*' hipchat.list_users api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15 api_version=v1
salt.modules.hipchat.
send_message
(room_id, message, from_name, api_url=None, api_key=None, api_version=None, color='yellow', notify=False)¶Send a message to a HipChat room.
Parameters: |
|
---|---|
Returns: | Boolean if message was sent successfully. |
CLI Example:
salt '*' hipchat.send_message room_id="Development Room" message="Build is done" from_name="Build Server"
salt '*' hipchat.send_message room_id="Development Room" message="Build failed" from_name="Build Server" color="red" notify=True