共用方式為


AdGroupExcludedAudienceIterator

包含逐一查看廣告群組排除物件清單的方法。 如需反覆運算器的相關資訊,請參閱 反覆運算器

範例使用方式:

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

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

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

方法

方法名稱 傳回類型 說明
hasNext 布林值 取得布林值,指出反覆運算器是否有更多專案。
AdGroupExcludedAudience 將反覆運算器往前移,並傳回下一個排除的廣告群組物件。
totalNumEntities int 取得符合選取器選取準則的廣告群組排除物件數目。

hasNext

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

傳回

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

next

將反覆運算器往前移,並傳回下一個排除的廣告群組物件。

傳回

類型 說明
AdGroupExcludedAudience 下一個廣告群組會排除反覆運算器中的物件。

totalNumEntities

取得符合選取器選取準則的廣告群組排除物件數目。

傳回

類型 說明
int 符合選取器選取準則的廣告群組排除物件數目。

另請參閱