first holoview chart
This commit is contained in:
@@ -73,8 +73,11 @@ def get_token(code):
|
||||
secret=POLAR_CLIENT_SECRET
|
||||
)
|
||||
|
||||
headers = { 'Authorization': 'Basic %s' % base64.b64encode(auth_string) }
|
||||
|
||||
try:
|
||||
headers = { 'Authorization': 'Basic %s' % base64.b64encode(auth_string) }
|
||||
except TypeError:
|
||||
headers = { 'Authorization': 'Basic %s' % base64.b64encode(bytes(auth_string,'utf-8')) }
|
||||
|
||||
response = requests.post("https://polarremote.com/v2/oauth2/token",
|
||||
data=post_data,
|
||||
headers=headers)
|
||||
@@ -116,7 +119,10 @@ def get_polar_notifications():
|
||||
secret=POLAR_CLIENT_SECRET
|
||||
)
|
||||
|
||||
headers = { 'Authorization': 'Basic %s' % base64.b64encode(auth_string) }
|
||||
try:
|
||||
headers = { 'Authorization': 'Basic %s' % base64.b64encode(auth_string) }
|
||||
except TypeError:
|
||||
headers = { 'Authorization': 'Basic %s' % base64.b64encode(bytes(auth_string,'utf-8')) }
|
||||
|
||||
response = requests.get(url, headers=headers)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user