mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Change Pushbullet to use Access-Token header
This commit is contained in:
parent
00ff9c5736
commit
67e5c7de2c
1 changed files with 10 additions and 5 deletions
|
@ -2080,8 +2080,10 @@ class PUSHBULLET(Notifier):
|
|||
http_handler = HTTPSConnection("api.pushbullet.com")
|
||||
http_handler.request("POST",
|
||||
"/v2/pushes",
|
||||
headers={'Content-type': "application/json",
|
||||
'Authorization': 'Basic %s' % base64.b64encode(self.config['apikey'] + ":")},
|
||||
headers={
|
||||
'Content-type': "application/json",
|
||||
'Access-Token': self.config['apikey']
|
||||
},
|
||||
body=json.dumps(data))
|
||||
response = http_handler.getresponse()
|
||||
request_status = response.status
|
||||
|
@ -2099,9 +2101,12 @@ class PUSHBULLET(Notifier):
|
|||
def get_devices(self):
|
||||
if self.config['apikey']:
|
||||
http_handler = HTTPSConnection("api.pushbullet.com")
|
||||
http_handler.request("GET", "/v2/devices",
|
||||
headers={'Content-type': "application/json",
|
||||
'Authorization': 'Basic %s' % base64.b64encode(self.config['apikey'] + ":")})
|
||||
http_handler.request("GET",
|
||||
"/v2/devices",
|
||||
headers={
|
||||
'Content-type': "application/json",
|
||||
'Access-Token': self.config['apikey']
|
||||
})
|
||||
|
||||
response = http_handler.getresponse()
|
||||
request_status = response.status
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue