%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/utils/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/utils/slack.pyc

�
���^c@@s�dZddlmZmZmZddlZddlmZddl	Z
ddlmZddl
Z
eje�Zddddddd�ZdS(uN
Library for interacting with Slack API

.. versionadded:: 2016.3.0

:configuration: This module can be used by specifying the name of a
    configuration profile in the minion config, minion pillar, or master
    config.

    For example:

    .. code-block:: yaml

        slack:
          api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
i(tabsolute_importtprint_functiontunicode_literalsN(turljoin(t__version__uGETcC@s�idd6td6}iidd6dd6d6id	d6d
d6d6idd6d
d6d6}|s�tdd�p|tdd�}|s�tjd�d|d<t|d<|Snd}	t|	d�}
|j|�jd�}t|
|t�}t|t�si}
n|j	�}
||
d<|d"kr/i}n|dkrHd|d<ntjj
j||d|
d|dtdtd|d|�}|jdd"�tjjjjjkr|d}|j|�jd�}d |kr�|d |d<t|d<|S|j|�|d<|S|jdd"�tjjjjjkr7tStj|�tj|
�tj|�tj|�d|kr�|d}d |kr�|d |d<t|d<|S|j|�|d<nd!|d<t|d<|Sd"S(#ut
    Slack object method function to construct and execute on the API URL.

    :param api_key:     The Slack api key.
    :param function:    The Slack api function to perform.
    :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.
    uumessageuresu
channels.listurequestuchannelsuresponseuroomsu
users.listumembersuusersuchat.postMessageuchannelu
config.getu
slack.api_keyu
slack:api_keyuNo Slack api key found.uhttps://slack.comu/api/utokenuPOSTuapplication/jsonuAccepttparamstdatatdecodetstatustheader_dicttoptsustatusudictuerroruinvalid_authN(tTruet__salt__tlogterrortFalset_urljointgett
isinstancetdicttcopytNonetsalttutilsthttptquerytexttsixtmovesthttp_clienttOKt
NO_CONTENTtdebug(tfunctiontapi_keytargstmethodR	RR
trettslack_functionstapi_urltbase_urltpathturltquery_paramstresultt_resulttresponse((s4/usr/lib/python2.7/site-packages/salt/utils/slack.pyR s�




	
	
	'

'







(t__doc__t
__future__RRRtloggingtsalt.ext.six.moves.urllib.parseRRtsalt.ext.six.moves.http_clientRtsalt.versionRtsalt.utils.httpt	getLoggert__name__R
RR(((s4/usr/lib/python2.7/site-packages/salt/utils/slack.pyt<module>s

Zerion Mini Shell 1.0