共用方式為


ProductGroupIterator

包含逐一查看產品群組清單的方法。 如需反覆運算器的相關資訊,請參閱 反覆運算器

範例使用方式:

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

    // Loops through all product groups in the account.
    while (iterator.hasNext()) {
        var group = iterator.next();
    }
}

方法

方法名稱 傳回類型 說明
hasNext 布林值 取得布林值,指出此反覆運算器是否有更多專案。
ProductGroup 推進反覆運算器,並傳回下一個產品群組。
totalNumEntities int 取得符合選取器選取準則的產品群組數目。

hasNext

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

傳回

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

next

推進反覆運算器,並傳回下一個產品群組。

傳回

類型 說明
ProductGroup 反覆運算器中的下一個產品群組。

totalNumEntities

取得符合選取器選取準則的產品群組數目。

傳回

類型 說明
int 符合選取器選取準則的產品群組數目。

另請參閱