From 2238067fbbe3fa6154150095f8a3b4b317a7c7dd Mon Sep 17 00:00:00 2001 From: Devendra Date: Mon, 25 Feb 2013 21:58:57 +0530 Subject: refactoring --- python/3.3/Pubnub.py | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'python/3.3/Pubnub.py') 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: -- cgit v1.2.3