Permalink
Browse files

checked rtm token

  • Loading branch information...
1 parent b887b01 commit 7fad5ae24c6be870618e72247f07344ae05c65f7 Greg Allen committed Jan 26, 2010
Showing with 4 additions and 2 deletions.
  1. +1 −1 rtm.py
  2. +3 −1 rtm_tasks.py
View
2 rtm.py
@@ -225,7 +225,7 @@ def indexed(seq):
API = {
'auth': {
'checkToken':
- [('auth_token',), ()],
+ [(), ()],
'getFrob':
[(), ()],
'getToken':
View
@@ -24,7 +24,8 @@ def main(args):
token = read_token()
rtm = RTM(api_key, secret, token)
- if token is None:
+
+ if token is None or rtm.auth.checkToken().stat != "ok":
import webbrowser
import time
url = rtm.getAuthURL()
@@ -33,6 +34,7 @@ def main(args):
time.sleep(15)
write_token(rtm.getToken())
+
search = args[0]
tasks = rtm.tasks.getList(filter = search)
print "RTM - %s" % (search)

0 comments on commit 7fad5ae

Please sign in to comment.