Number of ...
$limit = 500; // int | Number of documents per page
$offset = 0; // int | Index of the first document of the page
try {
$result = $apiInstance->getContactsFromList($listId, $modifiedSince, $limit, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ContactsApi->getContactsFromList: ', $e->getMessage(), PHP_EOL;
}
I think this is what you need, basically it reads the data in chunks (specified by will work. 但是他们每页有500个联系人的限制,而我有5000个。我怎么能用偏移量循环?$limit
$limit = 500; // int | Number of documents per page
$offset = 0; // int | Index of the first document of the page
try {
do {
$result = $apiInstance->getContactsFromList($listId, $modifiedSince, $limit, $offset);
// How much data has been passed back,
$received = count($result);
// Just to see each page being received
echo $received.PHP_EOL;
// Move offset on by entries in this page
$offset += $received;
}
// Carry on while a full page has been retrieved
while ($received == $limit);
} catch (Exception $e) {
echo 'Exception when calling ContactsApi->getContactsFromList: ', $e->getMessage(), PHP_EOL;
}
$received = count($result);
我得到的合同属于某个列表,并使用下面的代码,但他们每页有500个联系人的限制,而我有5000个。但他们每页有500个联系人的限制,而我有5000个。我怎么能用偏移量循环?$limit = 500; / int