共用方式為


CampaignExcludedAudienceIterator

包含逐一查看行銷活動排除物件清單的方法。 如需反覆運算器的相關資訊,請參閱 反覆運算器

範例使用方式:

    // 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();
        }
    }

方法

方法名稱 傳回類型 說明
hasNext 布林值 取得布林值,指出反覆運算器是否有更多專案。
CampaignExcludedAudience 推進反覆運算器,並傳回下一個行銷活動排除的物件。
totalNumEntities int 取得符合選取器選取準則的行銷活動排除物件數目。

hasNext

取得布林值,指出反覆運算器是否有更多專案。

傳回

類型 說明
布林值 如果反覆運算器有更多元素,則為 true ;否則為 false

next

推進反覆運算器,並傳回下一個行銷活動排除的物件。

傳回

類型 說明
CampaignExcludedAudience 下一個行銷活動會排除反覆運算器中的物件。

totalNumEntities

取得符合選取器選取準則的行銷活動排除物件數目。

傳回

類型 說明
int 符合選取器選取準則的行銷活動排除物件數目。

另請參閱