Reference documentation and code samples for the Google API Core Client class FixedSizeCollection.
A collection of elements retrieved using one or more API calls. The collection will attempt to retrieve a fixed number of elements, and will make API calls until that fixed number is reached, or there are no more elements to retrieve.
Namespace
Google \ ApiCoreMethods
__construct
FixedSizeCollection constructor.
Parameters | |
---|---|
Name | Description |
initialPage |
Google\ApiCore\Page
|
collectionSize |
int
|
getCollectionSize
Returns the number of elements in the collection. This will be equal to the collectionSize parameter used at construction unless there are no elements remaining to be retrieved.
Returns | |
---|---|
Type | Description |
int |
hasNextCollection
Returns true if there are more elements that can be retrieved from the API.
Returns | |
---|---|
Type | Description |
bool |
getNextPageToken
Returns a page token that can be passed into the API list method to retrieve additional elements.
Returns | |
---|---|
Type | Description |
string |
getNextCollection
Retrieves the next FixedSizeCollection using one or more API calls.
Returns | |
---|---|
Type | Description |
Google\ApiCore\FixedSizeCollection |
getIterator
Returns an iterator over the elements of the collection.
Returns | |
---|---|
Type | Description |
Generator |
iterateCollections
Returns an iterator over FixedSizeCollections, starting with this and making API calls as required until all of the elements have been retrieved.
Returns | |
---|---|
Type | Description |
Generator|array<Google\ApiCore\FixedSizeCollection> |