Skip to content

Commit 6702f9a

Browse files
committed
add userid parameter to init method of InoreaderClient
1 parent c5981c0 commit 6702f9a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

inoreader/client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
class InoreaderClient(object):
2020

21-
def __init__(self, app_id, app_key, auth_token=None):
21+
def __init__(self, app_id, app_key, userid=None, auth_token=None):
2222
self.app_id = app_id
2323
self.app_key = app_key
2424
self.auth_token = auth_token
@@ -28,7 +28,10 @@ def __init__(self, app_id, app_key, auth_token=None):
2828
'AppKey': self.app_key,
2929
'Authorization': 'GoogleLogin auth={}'.format(self.auth_token)
3030
})
31-
self.userid = None if not self.auth_token else self.userinfo()['userId']
31+
if userid:
32+
self.userid = userid
33+
else:
34+
self.userid = None if not self.auth_token else self.userinfo()['userId']
3235

3336
def userinfo(self):
3437
if not self.auth_token:

0 commit comments

Comments
 (0)