mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 12:59:42 -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 = HTTPSConnection("api.pushbullet.com")
|
||||||
http_handler.request("POST",
|
http_handler.request("POST",
|
||||||
"/v2/pushes",
|
"/v2/pushes",
|
||||||
headers={'Content-type': "application/json",
|
headers={
|
||||||
'Authorization': 'Basic %s' % base64.b64encode(self.config['apikey'] + ":")},
|
'Content-type': "application/json",
|
||||||
|
'Access-Token': self.config['apikey']
|
||||||
|
},
|
||||||
body=json.dumps(data))
|
body=json.dumps(data))
|
||||||
response = http_handler.getresponse()
|
response = http_handler.getresponse()
|
||||||
request_status = response.status
|
request_status = response.status
|
||||||
|
@ -2099,9 +2101,12 @@ class PUSHBULLET(Notifier):
|
||||||
def get_devices(self):
|
def get_devices(self):
|
||||||
if self.config['apikey']:
|
if self.config['apikey']:
|
||||||
http_handler = HTTPSConnection("api.pushbullet.com")
|
http_handler = HTTPSConnection("api.pushbullet.com")
|
||||||
http_handler.request("GET", "/v2/devices",
|
http_handler.request("GET",
|
||||||
headers={'Content-type': "application/json",
|
"/v2/devices",
|
||||||
'Authorization': 'Basic %s' % base64.b64encode(self.config['apikey'] + ":")})
|
headers={
|
||||||
|
'Content-type': "application/json",
|
||||||
|
'Access-Token': self.config['apikey']
|
||||||
|
})
|
||||||
|
|
||||||
response = http_handler.getresponse()
|
response = http_handler.getresponse()
|
||||||
request_status = response.status
|
request_status = response.status
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue