Lists
Get one page of a list, or every item in it.
A list method answers with a PageList. Await it for one page, or loop over it with for await for every item: it
asks for the next page as you go.
One page
const page = await goomzo.customers.list({ limit: 50 })
page.items // up to 50 customers
page.nextCursor // send as cursor for the next page, or null on the last
page.total // how many match, on every pageEvery item
for await (const customer of goomzo.customers.list({ limit: 200 })) {
await syncCustomer(customer)
}Note: limit sets the size of each page, up to 200. A larger page means fewer requests.
Next steps
Last updated