-
Notifications
You must be signed in to change notification settings - Fork 519
IterableApiClient
codefriar edited this page Dec 2, 2021
·
12 revisions
Demonstrates an interable REST API client that loads paginated records (strings) thanks to an iterator
Constructor accepting a named credential.
| Param | Description |
|---|---|
namedCredential |
name of the Named Credential to use |
Internal method that issues a REST request to read a record page
Type
RecordPage
Description
RecordPage a page with a list of records
Returns an iterator on RecordPage (as required by the Iterable interface)
Public custom exception class
Public class used for JSON deserialization of record page response
Custom Iterator used to navigate IterableApiClient responses as RecordPage. The iterator keeps track on the iteration state with currentPageIndex and totalRecordCount. It uses IterableApiClient to perform REST requests to load the record pages.