CampaignExcludedAudienceIterator

Contains the methods for iterating through a list of campaign excluded audiences. For information about iterators, see Iterators.

Example usage:

    // Gets the iterator that iterates all campaigns
    // in the account.
    var iterator = AdsApp.adGroups().get();

    // Loops through all campaigns in the account.
    while (iterator.hasNext()) {
        var adGroup = iterator.next();

        // Gets the iterator that iterates all campaign excluded audiences
        // in the campaign.
        var audienceIterator = adGroup.targeting().excludedAudiences().get();
    
        // Loops through all campaign excluded audiences in the campaign.
        while (audienceIterator.hasNext()) {
            var audience = iterator.next();
        }
    }

Methods

Method Name Return Type Description
hasNext Boolean Gets a Boolean value that indicates whether the iterator has more elements.
next CampaignExcludedAudience Advances the iterator and returns the next campaign excluded audience.
totalNumEntities int Gets the number of campaign excluded audiences that matched the selector's selection criteria.

hasNext

Gets a Boolean value that indicates whether the iterator has more elements.

Returns

Type Description
Boolean Is true if the iterator has more elements; otherwise, false.

next

Advances the iterator and returns the next campaign excluded audience.

Returns

Type Description
CampaignExcludedAudience The next campaign excluded audience in the iterator.

totalNumEntities

Gets the number of campaign excluded audiences that matched the selector's selection criteria.

Returns

Type Description
int The number of campaign excluded audiences that matched the selector's selection criteria.

See also