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
get AdsApp.AdParamIterator Fetches the requested ad params and returns an iterator.
orderBy AdsApp.AdParamSelector Specifies the ordering of the resulting entities.
withCondition AdsApp.AdParamSelector Adds the specified condition to the selector in order to narrow down the results.
withLimit AdsApp.AdParamSelector Specifies limit for the selector to use.

get()

Fetches the requested ad params and returns an iterator.

Return values:

TypeDescription
AdsApp.AdParamIterator Iterator 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
orderBy String Ordering to apply.

Return values:

TypeDescription
AdsApp.AdParamSelector The 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
condition String Condition to add to the selector.

Return values:

TypeDescription
AdsApp.AdParamSelector The 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
limit int How many entities to return.

Return values:

TypeDescription
AdsApp.AdParamSelector The selector with limit applied.