@@ -23,25 +23,23 @@ generated somewhere secure (they cannot be retrieved later if lost)
2323
2424## Usage
2525
26- Create your client instance by invoking " client = ConciergeClient()".
26+ from membersuite_api_client. client import ConciergeClient
2727
28- To authenticate and receive a session ID, call client.request_session().
28+ client = ConciergeClient(
29+ access_key=MS_ACCESS_KEY,
30+ secret_key=MS_SECRET_KEY,
31+ association_id=MS_ASSOCIATION_ID)
2932
30- This returns the session ID value when called, or this can be retrieved as an
31- attribute client.session_id.
33+ To authenticate and receive a session ID:
3234
33- This can now be used to make additional calls using the methods included in
34- the WSDL from MemberSuite. For documentation on available methods and their
35- usage, see http://api.docs.membersuite.com/
36-
37- Use request_session() as a model for constructing the headers for
38- your own functions in your app that follow this method:
35+ client.request_session()
36+ print client.session_id
3937
40- 1) Call client.construct_concierge_header(url) to generate a new header element, using your method's URL as an argument.
41- 2) Call client.service.method_name(_soapheaders=[concierge_request_header], method arguments)
42- 3) Return any relevant data out of the response object
38+ To take advantage of a service, for example ` subscriptions ` :
4339
44- *** IMPORTANT NOTE: In constructing headers, SessionId must appear first.***
40+ ORG_ID = #####
41+ service = SubscriptionService(self.client)
42+ subscription_list = service.get_subscriptions(org_id=ORG_ID)
4543
4644## Running tests
4745
@@ -56,7 +54,7 @@ To run specific tests, load them by module. For example:
5654## Contributing and Extending
5755
5856Looking to contribute? The best place to start is in the code base. Notice how
59- we created modules for each MemberSuite objects , like ` organizations ` .
57+ we created modules for each MemberSuite object , like ` organizations ` .
6058
6159Each module contains ` services.py ` and ` models.py ` files.
6260
@@ -67,3 +65,18 @@ where objects are retrieved from MemberSuite and converted to your models for
6765use in a python app. It is recommended that the services be classes and if
6866you define ` result_to_models ` and ` ms_object_to_model ` methods on the class
6967you can use the ChunkQueryMixin to make large queries.
68+
69+ ### Nuance
70+
71+ This can now be used to make additional calls using the methods included in
72+ the WSDL from MemberSuite. For documentation on available methods and their
73+ usage, see http://api.docs.membersuite.com/
74+
75+ Use request_session() as a model for constructing the headers for
76+ your own functions in your app that follow this method:
77+
78+ 1) Call client.construct_concierge_header(url) to generate a new header element, using your method's URL as an argument.
79+ 2) Call client.service.method_name(_soapheaders=[concierge_request_header], method arguments)
80+ 3) Return any relevant data out of the response object
81+
82+ *** IMPORTANT NOTE: In constructing headers, SessionId must appear first.***
0 commit comments