summaryrefslogtreecommitdiff
path: root/client/modules/Notifications.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-10-06 16:52:53 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2014-10-06 16:52:53 +0200
commit2b1e8411ab5eaa7e1349b78d03270ab02ae2950d (patch)
treeed914cbf8964bbe26ba28e80589f4c289b3fac3a /client/modules/Notifications.py
parent890a5798fcf7f9b9dc06529aa4bc7fe903d7ca1a (diff)
downloadjasper-client-2b1e8411ab5eaa7e1349b78d03270ab02ae2950d.tar.gz
jasper-client-2b1e8411ab5eaa7e1349b78d03270ab02ae2950d.zip
Fix flake8 style nits
Diffstat (limited to 'client/modules/Notifications.py')
-rw-r--r--client/modules/Notifications.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/client/modules/Notifications.py b/client/modules/Notifications.py
index 9ee004c..2d413b6 100644
--- a/client/modules/Notifications.py
+++ b/client/modules/Notifications.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8-*-
import re
-from facebook import *
+import facebook
WORDS = ["FACEBOOK", "NOTIFICATION"]
@@ -15,17 +15,19 @@ def handle(text, mic, profile):
Arguments:
text -- user-input, typically transcribed speech
mic -- used to interact with the user (for both input and output)
- profile -- contains information related to the user (e.g., phone number)
+ profile -- contains information related to the user (e.g., phone
+ number)
"""
oauth_access_token = profile['keys']['FB_TOKEN']
- graph = GraphAPI(oauth_access_token)
+ graph = facebook.GraphAPI(oauth_access_token)
try:
results = graph.request("me/notifications")
- except GraphAPIError:
- mic.say(
- "I have not been authorized to query your Facebook. If you would like to check your notifications in the future, please visit the Jasper dashboard.")
+ except facebook.GraphAPIError:
+ mic.say("I have not been authorized to query your Facebook. If you " +
+ "would like to check your notifications in the future, " +
+ "please visit the Jasper dashboard.")
return
except:
mic.say(