You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by mr...@apache.org on 2016/08/01 16:54:13 UTC
[38/50] [abbrv] usergrid git commit: fixed indentation on
disconnect_entities
fixed indentation on disconnect_entities
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/04a896e7
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/04a896e7
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/04a896e7
Branch: refs/heads/master
Commit: 04a896e75dc802152c9331cfee7be07cb0b74b1b
Parents: 3bc3d78
Author: Jeff West <jw...@apigee.com>
Authored: Tue Jul 26 17:00:10 2016 -0700
Committer: Jeff West <jw...@apigee.com>
Committed: Tue Jul 26 17:00:10 2016 -0700
----------------------------------------------------------------------
sdks/python/usergrid/UsergridClient.py | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/04a896e7/sdks/python/usergrid/UsergridClient.py
----------------------------------------------------------------------
diff --git a/sdks/python/usergrid/UsergridClient.py b/sdks/python/usergrid/UsergridClient.py
index 2ab8f73..e4b8ae1 100644
--- a/sdks/python/usergrid/UsergridClient.py
+++ b/sdks/python/usergrid/UsergridClient.py
@@ -369,21 +369,20 @@ class UsergridClient(object):
return UsergridResponse(r, self)
+ def disconnect_entities(self, from_entity, relationship, to_entity, auth=None, **kwargs):
+ url = connect_entities_by_type_template.format(from_collection=from_entity.get('type'),
+ from_uuid_name=from_entity.entity_id(),
+ relationship=relationship,
+ to_collection=to_entity.get('type'),
+ to_uuid_name=to_entity.entity_id(),
+ **self.url_data)
+
+ if auth:
+ r = requests.delete(url, headers={'Authorization': 'Bearer %s' % auth.access_token})
+ else:
+ r = self.session.delete(url)
-def disconnect_entities(self, from_entity, relationship, to_entity, auth=None, **kwargs):
- url = connect_entities_by_type_template.format(from_collection=from_entity.get('type'),
- from_uuid_name=from_entity.entity_id(),
- relationship=relationship,
- to_collection=to_entity.get('type'),
- to_uuid_name=to_entity.entity_id(),
- **self.url_data)
-
- if auth:
- r = requests.delete(url, headers={'Authorization': 'Bearer %s' % auth.access_token})
- else:
- r = self.session.delete(url)
-
- return UsergridResponse(r, self)
+ return UsergridResponse(r, self)
class UsergridUser(object):