diff options
| author | Devendra | 2013-02-25 21:58:57 +0530 |
|---|---|---|
| committer | Devendra | 2013-02-25 21:58:57 +0530 |
| commit | 2238067fbbe3fa6154150095f8a3b4b317a7c7dd (patch) | |
| tree | c833872dc41a06b64ac173911763e091a7ced6f8 /python/3.3/Pubnub.py | |
| parent | 2ea3826d516fdf10a889e98ffab04a8f1d790650 (diff) | |
| download | pubnub-python-2238067fbbe3fa6154150095f8a3b4b317a7c7dd.tar.bz2 | |
refactoring
Diffstat (limited to 'python/3.3/Pubnub.py')
| -rw-r--r-- | python/3.3/Pubnub.py | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/python/3.3/Pubnub.py b/python/3.3/Pubnub.py index e2b573f..5df77d5 100644 --- a/python/3.3/Pubnub.py +++ b/python/3.3/Pubnub.py @@ -25,27 +25,24 @@ class Pubnub(PubnubCore): publish_key, subscribe_key, secret_key = False, + cipher_key = False, ssl_on = False, origin = 'pubsub.pubnub.com', pres_uuid = None ) : super(Pubnub, self).__init__( - publish_key, - subscribe_key, - secret_key, - ssl_on, - origin, - pres_uuid + publish_key = publish_key, + subscribe_key = subscribe_key, + secret_key = secret_key, + cipher_key = cipher_key, + ssl_on = ssl_on, + origin = origin, + uuid = pres_uuid ) - def _request( self, request, origin = None, encode = True, params = None, callback = None ) : + def _request( self, request, callback = None ) : ## Build URL - url = (origin or self.origin) + '/' + "/".join( - encode and self._encode(request) or request - ) - ## Add query params - if params is not None and len(params) > 0: - url = url + "?" + "&".join(params) + url = self.getUrl(request) ## Send Request Expecting JSONP Response try: |
