Add get_member_types()
method for CORE API
This commit is contained in:
parent
bb8278dcc8
commit
852a989bd5
|
@ -132,6 +132,22 @@ class CoreWebAPI(object):
|
|||
assert set(js['result'].keys()) == set(['result'])
|
||||
return js['result']['result']
|
||||
|
||||
def get_member_types(self):
|
||||
"""
|
||||
Fetch all Member Type records from CORE.
|
||||
|
||||
:returns: A (potentially empty) list of member type dict records.
|
||||
"""
|
||||
params = {
|
||||
'entity': 'Memtype',
|
||||
'submethod': 'get',
|
||||
'columns': {},
|
||||
}
|
||||
|
||||
response = self.post(params)
|
||||
result = self.parse_response(response)
|
||||
return [json.loads(rec) for rec in result]
|
||||
|
||||
def get_members(self):
|
||||
"""
|
||||
Fetch all Member records from CORE.
|
||||
|
|
Loading…
Reference in a new issue