aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevendra2014-05-06 20:08:46 +0530
committerDevendra2014-05-06 20:08:46 +0530
commita38e680ae11453c2f3d5082c2ad39004366a9ad7 (patch)
tree723564b52de40cc609028701d7ff4fce273e9fa9
parent338ffccb4d6603a8af5951dda6fd1e1dd11473f9 (diff)
downloadpubnub-python-a38e680ae11453c2f3d5082c2ad39004366a9ad7.tar.bz2
fixing history api
-rw-r--r--Pubnub.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Pubnub.py b/Pubnub.py
index 75e2243..a759f75 100644
--- a/Pubnub.py
+++ b/Pubnub.py
@@ -504,7 +504,7 @@ class PubnubBase(object):
'subscribe_key': self.subscribe_key,
'callback': self._return_wrapped_callback(callback)})
- def here_now(self, channel, callback, error=None):
+ def here_now(self, channel, callback=None, error=None):
"""
#**
#* Here Now
@@ -557,6 +557,7 @@ class PubnubBase(object):
params['reverse'] = reverse
params['start'] = start
params['end'] = end
+ params['auth_key'] = self.auth_key
## Get History
return self._request({'urlcomponents': [
@@ -566,7 +567,7 @@ class PubnubBase(object):
self.subscribe_key,
'channel',
channel,
- ], 'urlparams': {'auth': self.auth_key}},
+ ], 'urlparams': params},
callback=self._return_wrapped_callback(callback),
error=self._return_wrapped_callback(error))
@@ -1137,7 +1138,6 @@ def _requests_request(url, timeout=320):
#print('timeout');
msg = str(error)
return (json.dumps(msg), 0)
-
return (resp.text, resp.status_code)