title | description | author | ms.author | ms.service | ms.topic |
---|---|---|---|---|---|
CampaignIterator object |
Contains the methods for iterating through a list of campaigns. |
jonmeyers |
jonmeyers |
bing-ads-scripts |
article |
Contains the methods for iterating through a list of campaigns. For information about iterators, see Iterators.
Example usage:
// Gets the iterator that iterates all campaigns
// in the account.
var iterator = AdsApp.campaigns().get();
// Loops through all campaigns in the account.
while (iterator.hasNext()) {
var campaign = iterator.next();
}
Method Name | Return Type | Description |
---|---|---|
hasNext | Boolean | Gets a Boolean value that indicates whether the iterator has more elements. |
next | Campaign | Advances the iterator and returns the next campaign. |
totalNumEntities | int | Gets the number of campaigns that matched the selector's selection criteria. |
Gets a Boolean value that indicates whether the iterator has more elements.
Type | Description |
---|---|
Boolean | Is true if the iterator has more elements; otherwise, false. |
Advances the iterator and returns the next campaign.
Type | Description |
---|---|
Campaign | The next campaign in the iterator. |
Gets the number of campaigns that matched the selector's selection criteria.
Type | Description |
---|---|
int | The number of campaigns that matched the selector's selection criteria. |