File size: 29,174 Bytes
3a7f06a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.addDevice","parameters":"(self, device_name)","argument_list":"","return_statement":"return self._request(\"POST\", HOST + \"\/devices\", data)","docstring":"Push a note\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            device_name -- Human readable name for device\n            type -- stream, thats all there is currently","docstring_summary":"Push a note\n            https:\/\/docs.pushbullet.com\/v2\/pushes","docstring_tokens":["Push","a","note","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","pushes"],"function":"def addDevice(self, device_name):\n        \"\"\" Push a note\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            device_name -- Human readable name for device\n            type -- stream, thats all there is currently\n\n        \"\"\"\n\n        data = {\"nickname\": device_name,\n                \"type\": \"stream\"\n                }\n        return self._request(\"POST\", HOST + \"\/devices\", data)","function_tokens":["def","addDevice","(","self",",","device_name",")",":","data","=","{","\"nickname\"",":","device_name",",","\"type\"",":","\"stream\"","}","return","self",".","_request","(","\"POST\"",",","HOST","+","\"\/devices\"",",","data",")"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L46-L59"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.getDevices","parameters":"(self)","argument_list":"","return_statement":"return self._request(\"GET\", HOST + \"\/devices\")[\"devices\"]","docstring":"Get devices\n            https:\/\/docs.pushbullet.com\/v2\/devices\n\n            Get a list of devices, and data about them.","docstring_summary":"Get devices\n            https:\/\/docs.pushbullet.com\/v2\/devices","docstring_tokens":["Get","devices","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","devices"],"function":"def getDevices(self):\n        \"\"\" Get devices\n            https:\/\/docs.pushbullet.com\/v2\/devices\n\n            Get a list of devices, and data about them.\n        \"\"\"\n\n        return self._request(\"GET\", HOST + \"\/devices\")[\"devices\"]","function_tokens":["def","getDevices","(","self",")",":","return","self",".","_request","(","\"GET\"",",","HOST","+","\"\/devices\"",")","[","\"devices\"","]"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L61-L68"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.deleteDevice","parameters":"(self, device_iden)","argument_list":"","return_statement":"return self._request(\"DELETE\", HOST + \"\/devices\/\" + device_iden)","docstring":"Delete a device\n            https:\/\/docs.pushbullet.com\/v2\/devices\n\n            Arguments:\n            device_iden -- iden of device to push to","docstring_summary":"Delete a device\n            https:\/\/docs.pushbullet.com\/v2\/devices","docstring_tokens":["Delete","a","device","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","devices"],"function":"def deleteDevice(self, device_iden):\n        \"\"\" Delete a device\n            https:\/\/docs.pushbullet.com\/v2\/devices\n\n            Arguments:\n            device_iden -- iden of device to push to\n        \"\"\"\n\n        return self._request(\"DELETE\", HOST + \"\/devices\/\" + device_iden)","function_tokens":["def","deleteDevice","(","self",",","device_iden",")",":","return","self",".","_request","(","\"DELETE\"",",","HOST","+","\"\/devices\/\"","+","device_iden",")"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L70-L78"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.pushNote","parameters":"(self, recipient, title, body, recipient_type=\"device_iden\")","argument_list":"","return_statement":"return self._request(\"POST\", HOST + \"\/pushes\", data)","docstring":"Push a note\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            recipient -- a recipient\n            title -- a title for the note\n            body -- the body of the note\n            recipient_type -- a type of recipient (device, email, channel or client)","docstring_summary":"Push a note\n            https:\/\/docs.pushbullet.com\/v2\/pushes","docstring_tokens":["Push","a","note","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","pushes"],"function":"def pushNote(self, recipient, title, body, recipient_type=\"device_iden\"):\n        \"\"\" Push a note\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            recipient -- a recipient\n            title -- a title for the note\n            body -- the body of the note\n            recipient_type -- a type of recipient (device, email, channel or client)\n        \"\"\"\n\n        data = {\"type\": \"note\",\n                \"title\": title,\n                \"body\": body}\n\n        data[recipient_type] = recipient\n\n        return self._request(\"POST\", HOST + \"\/pushes\", data)","function_tokens":["def","pushNote","(","self",",","recipient",",","title",",","body",",","recipient_type","=","\"device_iden\"",")",":","data","=","{","\"type\"",":","\"note\"",",","\"title\"",":","title",",","\"body\"",":","body","}","data","[","recipient_type","]","=","recipient","return","self",".","_request","(","\"POST\"",",","HOST","+","\"\/pushes\"",",","data",")"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L80-L97"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.pushAddress","parameters":"(self, recipient, name, address, recipient_type=\"device_iden\")","argument_list":"","return_statement":"return self._request(\"POST\", HOST + \"\/pushes\", data)","docstring":"Push an address\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            recipient -- a recipient\n            name -- name for the address, eg \"Bobs house\"\n            address -- address of the address\n            recipient_type -- a type of recipient (device, email, channel or client)","docstring_summary":"Push an address\n            https:\/\/docs.pushbullet.com\/v2\/pushes","docstring_tokens":["Push","an","address","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","pushes"],"function":"def pushAddress(self, recipient, name, address, recipient_type=\"device_iden\"):\n        \"\"\" Push an address\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            recipient -- a recipient\n            name -- name for the address, eg \"Bobs house\"\n            address -- address of the address\n            recipient_type -- a type of recipient (device, email, channel or client)\n        \"\"\"\n\n        data = {\"type\": \"address\",\n                \"name\": name,\n                \"address\": address}\n\t\t\t\t\n        data[recipient_type] = recipient\n\t\t\t\t\n        return self._request(\"POST\", HOST + \"\/pushes\", data)","function_tokens":["def","pushAddress","(","self",",","recipient",",","name",",","address",",","recipient_type","=","\"device_iden\"",")",":","data","=","{","\"type\"",":","\"address\"",",","\"name\"",":","name",",","\"address\"",":","address","}","data","[","recipient_type","]","=","recipient","return","self",".","_request","(","\"POST\"",",","HOST","+","\"\/pushes\"",",","data",")"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L99-L116"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.pushList","parameters":"(self, recipient, title, items, recipient_type=\"device_iden\")","argument_list":"","return_statement":"return self._request(\"POST\", HOST + \"\/pushes\", data)","docstring":"Push a list\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            recipient -- a recipient\n            title -- a title for the list\n            items -- a list of items\n            recipient_type -- a type of recipient (device, email, channel or client)","docstring_summary":"Push a list\n            https:\/\/docs.pushbullet.com\/v2\/pushes","docstring_tokens":["Push","a","list","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","pushes"],"function":"def pushList(self, recipient, title, items, recipient_type=\"device_iden\"):\n        \"\"\" Push a list\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            recipient -- a recipient\n            title -- a title for the list\n            items -- a list of items\n            recipient_type -- a type of recipient (device, email, channel or client)\n        \"\"\"\n\n        data = {\"type\": \"list\",\n                \"title\": title,\n                \"items\": items}\n\t\t\t\t\n        data[recipient_type] = recipient\n\n        return self._request(\"POST\", HOST + \"\/pushes\", data)","function_tokens":["def","pushList","(","self",",","recipient",",","title",",","items",",","recipient_type","=","\"device_iden\"",")",":","data","=","{","\"type\"",":","\"list\"",",","\"title\"",":","title",",","\"items\"",":","items","}","data","[","recipient_type","]","=","recipient","return","self",".","_request","(","\"POST\"",",","HOST","+","\"\/pushes\"",",","data",")"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L118-L135"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.pushLink","parameters":"(self, recipient, title, url, recipient_type=\"device_iden\")","argument_list":"","return_statement":"return self._request(\"POST\", HOST + \"\/pushes\", data)","docstring":"Push a link\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            recipient -- a recipient\n            title -- link title\n            url -- link url\n            recipient_type -- a type of recipient (device, email, channel or client)","docstring_summary":"Push a link\n            https:\/\/docs.pushbullet.com\/v2\/pushes","docstring_tokens":["Push","a","link","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","pushes"],"function":"def pushLink(self, recipient, title, url, recipient_type=\"device_iden\"):\n        \"\"\" Push a link\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            recipient -- a recipient\n            title -- link title\n            url -- link url\n            recipient_type -- a type of recipient (device, email, channel or client)\n        \"\"\"\n\n        data = {\"type\": \"link\",\n                \"title\": title,\n                \"url\": url}\n\t\t\t\t\n        data[recipient_type] = recipient\n\t\t\t\t\n        return self._request(\"POST\", HOST + \"\/pushes\", data)","function_tokens":["def","pushLink","(","self",",","recipient",",","title",",","url",",","recipient_type","=","\"device_iden\"",")",":","data","=","{","\"type\"",":","\"link\"",",","\"title\"",":","title",",","\"url\"",":","url","}","data","[","recipient_type","]","=","recipient","return","self",".","_request","(","\"POST\"",",","HOST","+","\"\/pushes\"",",","data",")"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L137-L154"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.pushFile","parameters":"(self, recipient, file_name, body, file, file_type=None, recipient_type=\"device_iden\")","argument_list":"","return_statement":"return self._request(\"POST\", HOST + \"\/pushes\", data)","docstring":"Push a file\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n            https:\/\/docs.pushbullet.com\/v2\/upload-request\n\n            Arguments:\n            recipient -- a recipient\n            file_name -- name of the file\n            file -- a file object\n            file_type -- file mimetype, if not set, python-magic will be used\n            recipient_type -- a type of recipient (device, email, channel or client)","docstring_summary":"Push a file\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n            https:\/\/docs.pushbullet.com\/v2\/upload-request","docstring_tokens":["Push","a","file","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","pushes","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","upload","-","request"],"function":"def pushFile(self, recipient, file_name, body, file, file_type=None, recipient_type=\"device_iden\"):\n        \"\"\" Push a file\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n            https:\/\/docs.pushbullet.com\/v2\/upload-request\n\n            Arguments:\n            recipient -- a recipient\n            file_name -- name of the file\n            file -- a file object\n            file_type -- file mimetype, if not set, python-magic will be used\n            recipient_type -- a type of recipient (device, email, channel or client)\n        \"\"\"\n\n        if not file_type:\n            try:\n                import magic\n            except ImportError:\n                raise Exception(\"No file_type given and python-magic isn't installed\")\n\n            # Unfortunately there's two libraries called magic, both of which do\n            # the exact same thing but have different conventions for doing so\n            if hasattr(magic, \"from_buffer\"):\n                file_type = magic.from_buffer(file.read(1024))\n            else:\n                _magic = magic.open(magic.MIME_TYPE)\n                _magic.compile(None)\n\n                file_type = _magic.file(file_name)\n\n                _magic.close()\n\n            file.seek(0)\n\n        data = {\"file_name\": file_name,\n                \"file_type\": file_type}\n\n        upload_request = self._request(\"GET\",\n                                       HOST + \"\/upload-request\",\n                                       None,\n                                       data)\n\n        upload = requests.post(upload_request[\"upload_url\"],\n                               data=upload_request[\"data\"],\n                               files={\"file\": file},\n                               headers={\"User-Agent\": \"pyPushBullet\"})\n\n        upload.raise_for_status()\n\n        data = {\"type\": \"file\",\n                \"file_name\": file_name,\n                \"file_type\": file_type,\n                \"file_url\": upload_request[\"file_url\"],\n                \"body\": body}\n\t\t\t\t\n        data[recipient_type] = recipient\n\n        return self._request(\"POST\", HOST + \"\/pushes\", data)","function_tokens":["def","pushFile","(","self",",","recipient",",","file_name",",","body",",","file",",","file_type","=","None",",","recipient_type","=","\"device_iden\"",")",":","if","not","file_type",":","try",":","import","magic","except","ImportError",":","raise","Exception","(","\"No file_type given and python-magic isn't installed\"",")","# Unfortunately there's two libraries called magic, both of which do","# the exact same thing but have different conventions for doing so","if","hasattr","(","magic",",","\"from_buffer\"",")",":","file_type","=","magic",".","from_buffer","(","file",".","read","(","1024",")",")","else",":","_magic","=","magic",".","open","(","magic",".","MIME_TYPE",")","_magic",".","compile","(","None",")","file_type","=","_magic",".","file","(","file_name",")","_magic",".","close","(",")","file",".","seek","(","0",")","data","=","{","\"file_name\"",":","file_name",",","\"file_type\"",":","file_type","}","upload_request","=","self",".","_request","(","\"GET\"",",","HOST","+","\"\/upload-request\"",",","None",",","data",")","upload","=","requests",".","post","(","upload_request","[","\"upload_url\"","]",",","data","=","upload_request","[","\"data\"","]",",","files","=","{","\"file\"",":","file","}",",","headers","=","{","\"User-Agent\"",":","\"pyPushBullet\"","}",")","upload",".","raise_for_status","(",")","data","=","{","\"type\"",":","\"file\"",",","\"file_name\"",":","file_name",",","\"file_type\"",":","file_type",",","\"file_url\"",":","upload_request","[","\"file_url\"","]",",","\"body\"",":","body","}","data","[","recipient_type","]","=","recipient","return","self",".","_request","(","\"POST\"",",","HOST","+","\"\/pushes\"",",","data",")"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L156-L212"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.getPushHistory","parameters":"(self, modified_after=0, cursor=None)","argument_list":"","return_statement":"return self._request(\"GET\", HOST + \"\/pushes\", None, data)[\"pushes\"]","docstring":"Get Push History\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Returns a list of pushes\n\n            Arguments:\n            modified_after -- Request pushes modified after this timestamp\n            cursor -- Request another page of pushes (if necessary)","docstring_summary":"Get Push History\n            https:\/\/docs.pushbullet.com\/v2\/pushes","docstring_tokens":["Get","Push","History","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","pushes"],"function":"def getPushHistory(self, modified_after=0, cursor=None):\n        \"\"\" Get Push History\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Returns a list of pushes\n\n            Arguments:\n            modified_after -- Request pushes modified after this timestamp\n            cursor -- Request another page of pushes (if necessary)\n        \"\"\"\n        data = {\"modified_after\": modified_after}\n        if cursor:\n            data[\"cursor\"] = cursor\n        return self._request(\"GET\", HOST + \"\/pushes\", None, data)[\"pushes\"]","function_tokens":["def","getPushHistory","(","self",",","modified_after","=","0",",","cursor","=","None",")",":","data","=","{","\"modified_after\"",":","modified_after","}","if","cursor",":","data","[","\"cursor\"","]","=","cursor","return","self",".","_request","(","\"GET\"",",","HOST","+","\"\/pushes\"",",","None",",","data",")","[","\"pushes\"","]"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L214-L227"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.deletePush","parameters":"(self, push_iden)","argument_list":"","return_statement":"return self._request(\"DELETE\", HOST + \"\/pushes\/\" + push_iden)","docstring":"Delete push\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            push_iden -- the iden of the push to delete","docstring_summary":"Delete push\n            https:\/\/docs.pushbullet.com\/v2\/pushes","docstring_tokens":["Delete","push","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","pushes"],"function":"def deletePush(self, push_iden):\n        \"\"\" Delete push\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            push_iden -- the iden of the push to delete\n        \"\"\"\n        return self._request(\"DELETE\", HOST + \"\/pushes\/\" + push_iden)","function_tokens":["def","deletePush","(","self",",","push_iden",")",":","return","self",".","_request","(","\"DELETE\"",",","HOST","+","\"\/pushes\/\"","+","push_iden",")"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L229-L236"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.getContacts","parameters":"(self)","argument_list":"","return_statement":"return self._request(\"GET\", HOST + \"\/contacts\")[\"contacts\"]","docstring":"Gets your contacts\n            https:\/\/docs.pushbullet.com\/v2\/contacts\n\n            returns a list of contacts","docstring_summary":"Gets your contacts\n            https:\/\/docs.pushbullet.com\/v2\/contacts","docstring_tokens":["Gets","your","contacts","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","contacts"],"function":"def getContacts(self):\n        \"\"\" Gets your contacts\n            https:\/\/docs.pushbullet.com\/v2\/contacts\n\n            returns a list of contacts\n        \"\"\"\n        return self._request(\"GET\", HOST + \"\/contacts\")[\"contacts\"]","function_tokens":["def","getContacts","(","self",")",":","return","self",".","_request","(","\"GET\"",",","HOST","+","\"\/contacts\"",")","[","\"contacts\"","]"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L238-L244"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.deleteContact","parameters":"(self, contact_iden)","argument_list":"","return_statement":"return self._request(\"DELETE\", HOST + \"\/contacts\/\" + contact_iden)","docstring":"Delete a contact\n            https:\/\/docs.pushbullet.com\/v2\/contacts\n\n            Arguments:\n            contact_iden -- the iden of the contact to delete","docstring_summary":"Delete a contact\n            https:\/\/docs.pushbullet.com\/v2\/contacts","docstring_tokens":["Delete","a","contact","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","contacts"],"function":"def deleteContact(self, contact_iden):\n        \"\"\" Delete a contact\n            https:\/\/docs.pushbullet.com\/v2\/contacts\n\n            Arguments:\n            contact_iden -- the iden of the contact to delete\n        \"\"\"\n        return self._request(\"DELETE\", HOST + \"\/contacts\/\" + contact_iden)","function_tokens":["def","deleteContact","(","self",",","contact_iden",")",":","return","self",".","_request","(","\"DELETE\"",",","HOST","+","\"\/contacts\/\"","+","contact_iden",")"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L246-L253"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.getUser","parameters":"(self)","argument_list":"","return_statement":"return self._request(\"GET\", HOST + \"\/users\/me\")","docstring":"Get this users information\n            https:\/\/docs.pushbullet.com\/v2\/users","docstring_summary":"Get this users information\n            https:\/\/docs.pushbullet.com\/v2\/users","docstring_tokens":["Get","this","users","information","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","users"],"function":"def getUser(self):\n        \"\"\" Get this users information\n            https:\/\/docs.pushbullet.com\/v2\/users\n        \"\"\"\n        return self._request(\"GET\", HOST + \"\/users\/me\")","function_tokens":["def","getUser","(","self",")",":","return","self",".","_request","(","\"GET\"",",","HOST","+","\"\/users\/me\"",")"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L255-L259"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.dismissEphemeral","parameters":"(self, notification_id, notification_tag, package_name, source_user_iden)","argument_list":"","return_statement":"return self._request(\"POST\", HOST + \"\/ephemerals\", data)","docstring":"Marks an ephemeral notification as dismissed\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            notification_id -- the id of the notification to dismiss\n            notification_tag -- the tag of the notification\n            package_name -- the name of the package that made the notification\n            source_user_iden -- the identifier for the user that made the notification","docstring_summary":"Marks an ephemeral notification as dismissed\n            https:\/\/docs.pushbullet.com\/v2\/pushes","docstring_tokens":["Marks","an","ephemeral","notification","as","dismissed","https",":","\/\/","docs",".","pushbullet",".","com","\/","v2","\/","pushes"],"function":"def dismissEphemeral(self, notification_id, notification_tag, package_name, source_user_iden):\n        \"\"\" Marks an ephemeral notification as dismissed\n            https:\/\/docs.pushbullet.com\/v2\/pushes\n\n            Arguments:\n            notification_id -- the id of the notification to dismiss\n            notification_tag -- the tag of the notification\n            package_name -- the name of the package that made the notification\n            source_user_iden -- the identifier for the user that made the notification\n        \"\"\"\n        data = {\"push\": {\"notification_id\": notification_id,\n                         \"notification_tag\": notification_tag,\n                         \"package_name\": package_name,\n                         \"source_user_iden\": source_user_iden,\n                         \"type\": \"dismissal\"},\n                \"type\": \"push\"}\n\n        return self._request(\"POST\", HOST + \"\/ephemerals\", data)","function_tokens":["def","dismissEphemeral","(","self",",","notification_id",",","notification_tag",",","package_name",",","source_user_iden",")",":","data","=","{","\"push\"",":","{","\"notification_id\"",":","notification_id",",","\"notification_tag\"",":","notification_tag",",","\"package_name\"",":","package_name",",","\"source_user_iden\"",":","source_user_iden",",","\"type\"",":","\"dismissal\"","}",",","\"type\"",":","\"push\"","}","return","self",".","_request","(","\"POST\"",",","HOST","+","\"\/ephemerals\"",",","data",")"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L261-L278"}
{"nwo":"Azelphur\/pyPushBullet","sha":"d230d80419f105367dade9337539dd112d574869","path":"pushbullet\/pushbullet.py","language":"python","identifier":"PushBullet.realtime","parameters":"(self, callback)","argument_list":"","return_statement":"","docstring":"Opens a Realtime Event Stream\n            https:\/\/docs.pushbullet.com\/stream\n\n            callback will be called with one argument, the JSON response\n            from the server, nop messages are filtered.\n\n            Arguments:\n            callback -- The function to call on activity","docstring_summary":"Opens a Realtime Event Stream\n            https:\/\/docs.pushbullet.com\/stream","docstring_tokens":["Opens","a","Realtime","Event","Stream","https",":","\/\/","docs",".","pushbullet",".","com","\/","stream"],"function":"def realtime(self, callback):\n        \"\"\" Opens a Realtime Event Stream\n            https:\/\/docs.pushbullet.com\/stream\n\n            callback will be called with one argument, the JSON response\n            from the server, nop messages are filtered.\n\n            Arguments:\n            callback -- The function to call on activity\n        \"\"\"\n\n        url = \"wss:\/\/stream.pushbullet.com\/websocket\/\" + self.apiKey\n        ws = create_connection(url)\n        while 1:\n            data = ws.recv()\n            data = json.loads(data)\n            if data[\"type\"] != \"nop\":\n                callback(data)","function_tokens":["def","realtime","(","self",",","callback",")",":","url","=","\"wss:\/\/stream.pushbullet.com\/websocket\/\"","+","self",".","apiKey","ws","=","create_connection","(","url",")","while","1",":","data","=","ws",".","recv","(",")","data","=","json",".","loads","(","data",")","if","data","[","\"type\"","]","!=","\"nop\"",":","callback","(","data",")"],"url":"https:\/\/github.com\/Azelphur\/pyPushBullet\/blob\/d230d80419f105367dade9337539dd112d574869\/pushbullet\/pushbullet.py#L280-L297"}