%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/modules/pushbullet.pyc

�
���^c@@s�dZddlmZmZmZddlZyddlZeZWne	k
r]e
ZnXeje�Z
d�Zdefd��YZdddd�ZdS(u{
Module for sending messages to Pushbullet (https://www.pushbullet.com)

.. versionadded:: 2015.8.0

Requires an ``api_key`` in ``/etc/salt/minion``:

.. code-block: yaml

    pushbullet:
      api_key: 'ABC123abc123ABC123abc123ABC123ab'

For example:

.. code-block:: yaml

    pushbullet:
      device: "Chrome"
      title: "Example push message"
      body: "Message body."

i(tabsolute_importtprint_functiontunicode_literalsNcC@s@tstdfStdd�r<tdd�r<tdfStS(NuMissing pushbullet library.u
config.getupushbullet.api_keyupushbullet:api_keyu,Pushbullet API Key Unavailable, not loading.(tHAS_PUSHBULLETtFalset__salt__tTrue(((s;/usr/lib/python2.7/site-packages/salt/modules/pushbullet.pyt__virtual__&s

t_SaltPushbulletcB@s#eZd�Zd�Zd�ZRS(cC@sHtdd�ptdd�}tj|�|_|j|�|_dS(Nu
config.getupushbullet.api_keyupushbullet:api_key(Rt
pushbullett
Pushbullettpbt_find_device_by_namettarget(tselftdevice_nametapi_key((s;/usr/lib/python2.7/site-packages/salt/modules/pushbullet.pyt__init__1scC@s"|jj||d|j�}|S(Ntdevice(Rt	push_noteR
(Rttitletbodytpush((s;/usr/lib/python2.7/site-packages/salt/modules/pushbullet.pyR7scC@s.x'|jjD]}|j|kr
|Sq
WdS(N(Rtdevicestnickname(Rtnametdev((s;/usr/lib/python2.7/site-packages/salt/modules/pushbullet.pyR;s(t__name__t
__module__RRR(((s;/usr/lib/python2.7/site-packages/salt/modules/pushbullet.pyR/s		cC@s"t|�}|j||�}|S(u]
    Pushing a text note.

    :param device:   Pushbullet target device
    :param title:    Note title
    :param body:     Note body

    :return:            Boolean if message was sent successfully.

    CLI Example:

    .. code-block:: bash

        salt "*" pushbullet.push_note device="Chrome" title="Example title" body="Example body."
    (RR(RRRtspbtres((s;/usr/lib/python2.7/site-packages/salt/modules/pushbullet.pyRAs(t__doc__t
__future__RRRtloggingR	RRtImportErrorRt	getLoggerRtlogRtobjectRtNoneR(((s;/usr/lib/python2.7/site-packages/salt/modules/pushbullet.pyt<module>s


		

Zerion Mini Shell 1.0