Skip to content

Commit 3c8d204

Browse files
committed
Updates to readme; typo fix;
1 parent a062d0e commit 3c8d204

2 files changed

Lines changed: 29 additions & 16 deletions

File tree

README.md

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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

5856
Looking 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

6159
Each 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
6765
use in a python app. It is recommended that the services be classes and if
6866
you define `result_to_models` and `ms_object_to_model` methods on the class
6967
you 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.***

membersuite_api_client/mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def run_query(base_query, start_record, limit_to):
4141
call_count = 1
4242
"""
4343
continue to run queries as long as we
44-
- don't excede the call call_count
44+
- don't exceed the call call_count
4545
- don't see results that are less than the limited length (the end)
4646
"""
4747
while (

0 commit comments

Comments
 (0)