platypush/plugins/pushbullet/__init__.py
def send_clipboard(self, text: str):
        """
        Copy text to the clipboard of a device.

        :param text: Text to be copied.
        """
        backend = get_backend('pushbullet')
        device_id = backend.get_device_id() if backend else None

        resp = requests.post('https://api.pushbullet.com/v2/ephemerals',
                             data=json.dumps({
                                 'type': 'push',
                                 'push': {
                                     'body': text,
                                     'type': 'clip',
                                     'source_device_iden': device_id,
                                 },
                             }),
                             headers={'Authorization': 'Bearer ' + self.token,
                                      'Content-Type': 'application/json'})

        resp.raise_for_status()

        Copy text to the clipboard of a device.

        :param text: Text to be copied.
        
Copy text to the clipboard of a device.
Copy text to the clipboard of a device .
def send_clipboard(self, text: str):
        backend = get_backend('pushbullet')
        device_id = backend.get_device_id() if backend else None
        resp = requests.post('https://api.pushbullet.com/v2/ephemerals',
                             data=json.dumps({
                                 'type': 'push',
                                 'push': {
                                     'body': text,
                                     'type': 'clip',
                                     'source_device_iden': device_id,
                                 },
                             }),
                             headers={'Authorization': 'Bearer ' + self.token,
                                      'Content-Type': 'application/json'})
        resp.raise_for_status()
def send_clipboard ( self , text : str ) : backend = get_backend ( 'pushbullet' ) device_id = backend . get_device_id ( ) if backend else None resp = requests . post ( 'https://api.pushbullet.com/v2/ephemerals' , data = json . dumps ( { 'type' : 'push' , 'push' : { 'body' : text , 'type' : 'clip' , 'source_device_iden' : device_id , } , } ) , headers = { 'Authorization' : 'Bearer ' + self . token , 'Content-Type' : 'application/json' } ) resp . raise_for_status ( )
Copy text to the clipboard of a device.
Copy text to the clipboard of a device .
"""
        Copy text to the clipboard of a device.

        :param text: Text to be copied.
        """
self
text
str
Text to be copied.
Text to be copied .