API Client
|
Public Member Functions | |
__construct ($client, $endpoint, $query, $result) | |
totalResults () | |
getRecords () | |
generator () | |
Protected Attributes | |
$client | |
$endpoint | |
$query | |
$result | |
Represents result of API call returning a list of records, such as Model::getList() and Model::getRelated()
OneCRM\APIClient\ListResult::generator | ( | ) |
Returns a generator object used to iterate over all results in a foreach loop. The generator will automatically send additional API requests as needed to fetch more data.
OneCRM\APIClient\ListResult::getRecords | ( | ) |
Returns the list of records returned by API call
OneCRM\APIClient\ListResult::totalResults | ( | ) |
Returns total number of results
Model::getList() and Model::getRelated() return a limited number of records (no more than 200), and a total number of results matching the request. You can use total number of results to decide if you need to send additional requests to fetch more data.