Using the Client and Retrieving Compliance Data¶
Overview¶
Using the PerformMatch Compliance API is fairly straightforward. The API is accessed by way of a
Client()
instance created with your API token (provided by PerformLine
Support). The client instance exposes methods that allow you to access the various data associated
with your account. To explore these methods, see the second below detailing what can be accessed for
each product that we offer.
Products & Data¶
The methods in the following classes are the primary means of accessing product-specific data and,
in general, using the API. These classes are _mixins_, so each of the methods are available on an
instance of Client()
.
Mix-in Classes¶
Client Class Reference¶
-
class
performline.client.
Client
(token, *args, **kwargs)[source]¶ PerformLine API Client
-
wrap_response
(response, model, flat=False)[source]¶ Takes a SuccessResponse and returns the results as instances of the given model.
Parameters: - response (SuccessResponse) – A SuccessResponse object containing the data to be wrapped.
- model (RestModel) – A subclass of RestModel that should be used
- creating instances for each result in the response. (when) –
- flat (bool, optional) – Whether single-element lists should return just that element instead of the list itself.
Returns: If
response
contains zero results, returns None.If
response
has one element andflat
equals True, return the first element as an instance of typemodel
.In all other cases, return a list of instances of type
model
.
-