AdsApp.​AdParamSelector

Fetches ad params. Unlike other selectors, does not support filtering or sorting.

Typical usage:

var adParamSelector = AdsApp.adParams();

var adParamIterator = adParamSelector.get();
while (adParamIterator.hasNext()) {
  var adParam = adParamIterator.next();
}
Related:

Methods:

MemberTypeDescription
getAdsApp.AdParamIteratorFetches the requested ad params and returns an iterator.
orderByAdsApp.AdParamSelectorSpecifies the ordering of the resulting entities.
withConditionAdsApp.AdParamSelectorAdds the specified condition to the selector in order to narrow down the results.
withLimitAdsApp.AdParamSelectorSpecifies limit for the selector to use.

get()

Fetches the requested ad params and returns an iterator.

Return values:

TypeDescription
AdsApp.AdParamIteratorIterator of the requested ad params.

orderBy(orderBy)

Specifies the ordering of the resulting entities. The orderBy parameter can have one of the following forms:
  • orderBy("ad_parameter.parameter_index") - orders results by index, in ascending order.
  • orderBy("ad_parameter.parameter_index ASC") - orders results by index, in ascending order.
  • orderBy("ad_parameter.insertion_text DESC") - orders results by insertion text, in descending order.

Arguments:

NameTypeDescription
orderByStringOrdering to apply.

Return values:

TypeDescription
AdsApp.AdParamSelectorThe selector with ordering applied.

withCondition(condition)

Adds the specified condition to the selector in order to narrow down the results.

Multiple conditions can be added to the same selector:

selector = selector
    .withCondition("ad_parameter.parameter_index = 1")
    .withCondition("ad_parameter.insertion_text = '$99'");
All specified conditions are AND-ed together. The above example will retrieve ad params whose index is 1 and insertion text is '$99'.

The condition passed into this method must be of the following form:

"COLUMN_NAME OPERATOR VALUE"

Arguments:

NameTypeDescription
conditionStringCondition to add to the selector.

Return values:

TypeDescription
AdsApp.AdParamSelectorThe selector with the condition applied.

withLimit(limit)

Specifies limit for the selector to use. For instance, withLimit(50) returns only the first 50 entities.

Arguments:

NameTypeDescription
limitintHow many entities to return.

Return values:

TypeDescription
AdsApp.AdParamSelectorThe selector with limit applied.