-
Notifications
You must be signed in to change notification settings - Fork 8
Concepts
js.sevestre edited this page Dec 19, 2019
·
6 revisions
list
or search
api use pagination.
Properties to used for pagination:
-
maxResults
: how many results per response. -
cursor
: use the one provided by the previous response to get next page. -
more
: the server has more results for you.
# pseudo code
more = True
cursor = None
maxResults= 50
while more:
resp = api_list_call(maxResults, cursor, {other api parameters} )
more = resp.more
cursor = resp.cursor
-
customer
orcustomerId
: a customer id. -
instance
orinstanceId
: a instance id. -
maxResult
: see Pagination. -
cursor
: see Pagination. -
more
: see Pagination.fields
: some api allow to specify which fields should be returned in the response. It may be useful to reduce response size - for big list call. -
callId
: used only by the front application, ignore it. -
fields
: response will contain only specified properties.
Fields example
users = api_client.get_call("user", "list", fields="items(email, uid)",
print(users)
>>{items: [
>> {email: "tt@tt.com", uid: "123456789"},
>> {email: "uu@uu.com", uid: "012345678"},
>> ...
>>]}
Most of the text are stored in translatable
structure (even if mention as string on the api def)
"title" : {
"en": "Title",
"fr": "Titre"
}