Merge pull request #105 from ibrokemypie/github-headers

[modules/github] Use header rather than url for token
This commit is contained in:
tobi-wan-kenobi 2017-06-05 10:54:25 +02:00 committed by GitHub
commit 815a48f65d

View file

@ -44,7 +44,7 @@ class Module(bumblebee.engine.Module):
self._count = 0 self._count = 0
return return
notifications = requests.get("https://api.github.com/notifications?access_token={}".format(token)).text notifications = requests.get("https://api.github.com/notifications", headers={"Authorization":"token "+format(token)}).text
unread = 0 unread = 0
for notification in json.loads(notifications): for notification in json.loads(notifications):
if "unread" in notification and notification["unread"] == True: if "unread" in notification and notification["unread"] == True: