Module Expr Str ImportFrom alias Import alias Import alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str FunctionDef arguments args defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad Str NameLoad body Expr Str Assign NameStore Dict Assign NameStore Dict If UnaryOpNot NameLoad body TryExcept body Assign NameStore Call SubscriptLoad NameLoad Index Str Str Assign NameStore Call AttributeLoad NameLoad attr Str handlers ExceptHandler type TupleLoad NameLoad NameLoad NameLoad body Pass If BoolOpOr UnaryOpNot NameLoad UnaryOpNot NameLoad body TryExcept body Assign NameStore Call SubscriptLoad NameLoad Index Str Str If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str handlers ExceptHandler type TupleLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Return NameLoad If NameLoad body Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad orelse Assign NameStore Str Assign NameStore Dict Str Str Dict Str Str Str Dict Str Str Str Str Dict Str Str Str Str Dict Str Str Str Str Dict Str Str Str Dict Str Str Str Str Dict Str Str Str Str Dict Str Str NameLoad NameLoad Assign NameStore Str If NameLoad body Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad attr Str Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Str body Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str NameLoad If CompareEq NameLoad Str body Assign SubscriptStore NameLoad Index Str Str If NameLoad body If Call AttributeLoad NameLoad attr Str NameLoad body Assign SubscriptStore NameLoad Index Str Num Assign NameStore Call NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Str body Assign SubscriptStore NameLoad Index Str Str orelse Expr Call AttributeLoad NameLoad attr Str Return NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If CompareEq Call AttributeLoad NameLoad attr Str NameLoad AttributeLoad AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr attr body Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad attr Str Return Call AttributeLoad Call AttributeLoad NameLoad attr Str Dict attr NameLoad NameLoad orelse If CompareEq Call AttributeLoad NameLoad attr Str NameLoad AttributeLoad AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr attr body Return NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body For NameStore Call NameLoad Num Call NameLoad NameLoad body If CompareEq SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str NameLoad body Return SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body For NameStore Call NameLoad Num Call NameLoad NameLoad body If CompareEq SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str NameLoad body Return SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad Str NameLoad body Expr Str Assign NameStore Call NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Slice Num Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Slice Num Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad If NameLoad body Return NameLoad orelse Return NameLoad decorator_list
N/A N/A 
Module for sending messages to hipchat.

.. versionadded:: 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:

    .. code-block:: yaml

        hipchat:
          api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
          api_version: v1

    Custom API Example:

    .. code-block:: yaml

        hipchat:
          api_url: http://api.hipchat.myteam.com
          api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
          api_version: v2
 __future__ absolute_import N/A json N/A logging salt.ext.six.moves.urllib.parse urljoin _urljoin salt.ext.six.moves.urllib.parse urlencode _urlencode salt.ext.six.moves range N/A salt.ext.six.moves.http_client N/A salt.utils.http N/A log N/A N/A logging getLogger __name__ N/A __virtualname__ hipchat __virtual__ N/A N/A N/A N/A N/A 
    Return virtual name of the module.

    :return: The virtual name of the module.
     N/A __virtualname__ N/A _query N/A N/A function api_url api_key api_version room_id method data N/A None None None None GET None N/A N/A 
    HipChat object method function to construct and execute on the API URL.

    :param api_url:     The HipChat API URL.
    :param api_key:     The HipChat api key.
    :param function:    The HipChat api function to perform.
    :param api_version: The HipChat api version (v1 or v2).
    :param method:      The HTTP method, e.g. GET or POST.
    :param data:        The data to be sent for POST method.
    :return:            The json response from the API call or False.
     N/A headers N/A N/A query_params N/A N/A N/A api_url N/A N/A N/A N/A options N/A N/A __salt__ N/A config.option hipchat N/A api_url N/A N/A options get api_url N/A N/A N/A N/A NameError KeyError AttributeError N/A N/A N/A N/A N/A api_key N/A api_version N/A N/A N/A N/A options N/A N/A __salt__ N/A config.option hipchat N/A N/A api_key N/A N/A api_key N/A N/A options get api_key N/A N/A api_version N/A N/A api_version N/A N/A options get api_version N/A N/A N/A N/A NameError KeyError AttributeError N/A N/A N/A N/A log error No HipChat api key or version found. N/A False N/A room_id N/A N/A room_id N/A N/A room/{0}/notification format N/A str room_id N/A N/A room_id room/0/notification N/A hipchat_functions N/A v1 v2 N/A rooms users message N/A request response rooms/list rooms N/A request response users/list users N/A request response rooms/message status N/A rooms users message N/A request response room items N/A request response user items N/A request response room_id None N/A use_api_url https://api.hipchat.com N/A api_url N/A N/A use_api_url api_url N/A base_url N/A _urljoin use_api_url N/A api_version / N/A path N/A N/A N/A N/A N/A N/A hipchat_functions get api_version get function get request N/A url N/A _urljoin base_url path False N/A N/A api_version v1 N/A N/A N/A query_params N/A format json N/A N/A query_params N/A auth_token api_key N/A N/A method POST N/A N/A N/A headers N/A Content-Type application/x-www-form-urlencoded N/A data N/A N/A N/A N/A data get notify None N/A N/A N/A data N/A notify 1 N/A data N/A _urlencode data N/A N/A N/A api_version v2 N/A N/A N/A headers N/A Authorization N/A N/A Bearer {0} format api_key N/A data N/A N/A data N/A N/A json dumps data N/A N/A method POST N/A N/A N/A headers N/A Content-Type application/json N/A N/A N/A N/A log error Unsupported HipChat API version N/A False N/A result N/A N/A N/A N/A salt utils http query url method params query_params data data decode True status True header_dict headers opts __opts__ N/A N/A N/A N/A result get status None N/A N/A N/A N/A N/A salt ext six moves http_client OK N/A N/A response N/A N/A N/A N/A N/A N/A hipchat_functions get api_version get function get response N/A N/A N/A N/A N/A result get dict N/A get response None N/A N/A N/A N/A N/A result get status None N/A N/A N/A N/A N/A salt ext six moves http_client NO_CONTENT N/A N/A False N/A N/A N/A N/A log debug url N/A N/A N/A log debug query_params N/A N/A N/A log debug data N/A N/A N/A log debug result N/A N/A N/A result get error N/A N/A N/A N/A log error result N/A False N/A list_rooms N/A N/A api_url api_key api_version N/A None None None N/A N/A 
    List all HipChat rooms.

    :param api_url: The HipChat API URL, if not specified in the configuration.
    :param api_key: The HipChat admin api key.
    :param api_version: The HipChat api version, if not specified in the configuration.
    :return: The room list.

    CLI Example:

    .. code-block:: bash

        salt '*' hipchat.list_rooms

        salt '*' hipchat.list_rooms api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15 api_version=v1
     N/A foo N/A _query function rooms api_url api_url api_key api_key api_version api_version N/A N/A N/A log debug N/A N/A foo {0} format foo N/A foo N/A list_users N/A N/A api_url api_key api_version N/A None None None N/A N/A 
    List all HipChat users.

    :param api_url: The HipChat API URL, if not specified in the configuration.
    :param api_key: The HipChat admin api key.
    :param api_version: The HipChat api version, if not specified in the configuration.
    :return: The user list.

    CLI Example:

    .. code-block:: bash

        salt '*' hipchat.list_users

        salt '*' hipchat.list_users api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15 api_version=v1
     N/A N/A _query function users api_url api_url api_key api_key api_version api_version N/A find_room N/A N/A name api_url api_key api_version N/A None None None N/A N/A 
    Find a room by name and return it.

    :param name:    The room name.
    :param api_url: The HipChat API URL, if not specified in the configuration.
    :param api_key: The HipChat admin api key.
    :param api_version: The HipChat api version, if not specified in the configuration.
    :return:        The room object.

    CLI Example:

    .. code-block:: bash

        salt '*' hipchat.find_room name="Development Room"

        salt '*' hipchat.find_room name="Development Room" api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15 api_version=v1
     N/A rooms N/A list_rooms api_url api_url api_key api_key api_version api_version N/A rooms N/A N/A x N/A range 0 N/A len rooms N/A N/A N/A N/A N/A rooms N/A x N/A name name N/A N/A N/A rooms N/A x N/A False N/A find_user N/A N/A name api_url api_key api_version N/A None None None N/A N/A 
    Find a user by name and return it.

    :param name:        The user name.
    :param api_url:     The HipChat API URL, if not specified in the configuration.
    :param api_key:     The HipChat admin api key.
    :param api_version: The HipChat api version, if not specified in the configuration.
    :return:            The user object.

    CLI Example:

    .. code-block:: bash

        salt '*' hipchat.find_user name="Thomas Hatch"

        salt '*' hipchat.find_user name="Thomas Hatch" api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15 api_version=v1
     N/A users N/A list_users api_url api_url api_key api_key api_version api_version N/A users N/A N/A x N/A range 0 N/A len users N/A N/A N/A N/A N/A users N/A x N/A name name N/A N/A N/A users N/A x N/A False N/A send_message N/A N/A room_id message from_name api_url api_key api_version color notify N/A None None None yellow False N/A N/A 
    Send a message to a HipChat room.

    :param room_id:     The room id or room name, either will work.
    :param message:     The message to send to the HipChat room.
    :param from_name:   Specify who the message is from.
    :param api_url:     The HipChat api URL, if not specified in the configuration.
    :param api_key:     The HipChat api key, if not specified in the configuration.
    :param api_version: The HipChat api version, if not specified in the configuration.
    :param color:       The color for the message, default: yellow.
    :param notify:      Whether to notify the room, default: False.
    :return:            Boolean if message was sent successfully.

    CLI Example:

    .. code-block:: bash

        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
     N/A parameters N/A dict N/A N/A parameters N/A room_id room_id N/A N/A parameters N/A from N/A from_name N/A 15 N/A N/A parameters N/A message N/A message N/A 10000 N/A N/A parameters N/A message_format text N/A N/A parameters N/A color color N/A N/A parameters N/A notify notify N/A result N/A _query function message api_url api_url api_key api_key api_version api_version room_id room_id method POST data parameters N/A result N/A N/A True N/A N/A False N/A