Skip to content

Commit

Permalink
PythonSDKV1-2.8.2
Browse files Browse the repository at this point in the history
 -Change method (GET POST PUT DELETE) with uppercase
  • Loading branch information
SUDHANSHU authored and SUDHANSHU committed Aug 9, 2018
1 parent 559dc25 commit 481ae63
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 20 deletions.
32 changes: 20 additions & 12 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# sdk-python-customer-identity
# Python-SDK

LoginRadius Python SDK for customer identity

Work In Progress
------------------
To check right now, do git clone
![Home Image](http://docs.lrcontent.com/resources/github/banner-1544x500.png)


From Package (Not yet completely checked)
=========
## Installing #

Using pip

Expand All @@ -16,15 +15,19 @@ or with easy_install

easy_install loginradius

Online Documentation
====================
Changelog
======
2.8.2
-----

* Fixed HTTP method request name bug.

You can read more at
2.8.1
-----

http://loginradius.readthedocs.org/
* Fixed issue of function authenticate user.
* Added API for authenticating user by emailid.

Changelog
======
2.8
-----

Expand All @@ -34,3 +37,8 @@ Changelog
-----

* Added User Registration APIs


## Documentation

[Getting Started](https://docs.loginradius.com/api/v1/sdk-libraries/python) - Everything you need to begin using this SDK.
Empty file modified demo/cgi/LoginRadiusFrontEnd.js
100644 → 100755
Empty file.
Empty file modified demo/cgi/backend.py
100644 → 100755
Empty file.
Empty file modified demo/cgi/frontend.py
100644 → 100755
Empty file.
Empty file modified demo/cgi/style.css
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/LoginRadius.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
__copyright__ = "Copyright 2016-2017, LoginRadius"
__email__ = "developers@loginradius.com"
__status__ = "Production"
__version__ = "2.8.1"
__version__ = "2.8.2"

SECURE_API_URL = "https://api.loginradius.com/"
HEADERS = {'Accept': "application/json"}
Expand Down
12 changes: 6 additions & 6 deletions lib/UserRegistration.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
__copyright__ = "Copyright 2015-2016, LoginRadius"
__email__ = "developers@loginradius.com"
__status__ = "Production"
__version__ = "2.8.1"
__version__ = "2.8.2"

SECURE_API_URL = "https://api.loginradius.com/"
HEADERS = {'Accept': "application/json"}
Expand Down Expand Up @@ -198,12 +198,12 @@ def _get_json(self, url, payload):
raise
return self._process_result(self.settings.json.load(data))

def __submit_json(self, method,url, payload):
def __submit_json(self, method, url, payload):
"""Post JSON to LoginRadius"""
if self.settings.requests:
import json
HEADERS = {'content-type': 'application/json'}
if method == 'put':
if method == 'PUT':
r = self.settings.requests.put(url, data=json.dumps(payload), headers=HEADERS)
else:
r = self.settings.requests.post(url, data=json.dumps(payload), headers=HEADERS)
Expand All @@ -216,7 +216,7 @@ def __submit_json(self, method,url, payload):
data = data.encode('ascii')
HEADERS = {'content-type': 'application/json'}
r = self.settings.urllib2.Request(url, data, {'Content-Type': 'application/json'})
if method == 'put':
if method == 'PUT':
r.get_method = lambda: method
for key, value in HEADERS.items():
r.add_header(key, value)
Expand All @@ -227,10 +227,10 @@ def __submit_json(self, method,url, payload):
return self._process_result(self.settings.json.load(data))

def _post_json(self, url, payload):
return self.__submit_json('post', url, payload)
return self.__submit_json('POST', url, payload)

def _put_json(self, url, payload):
return self.__submit_json('put', url, payload)
return self.__submit_json('PUT', url, payload)


def _get_api_key(self):
Expand Down
Empty file modified lib/__init__.py
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/setup.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
setup(
name = 'LoginRadius',
py_modules = ['LoginRadius'],
version = '2.8.1',
version = '2.8.2',
description = 'Social Login and User Registration for Python.',
author='LoginRadius',
author_email='developers@loginradius.com',
Expand Down

0 comments on commit 481ae63

Please sign in to comment.