AdsApp.AdParamSelector
Stay organized with collections
Save and categorize content based on your preferences.
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:
get()
Fetches the requested ad params and returns an iterator.
Return values:
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:
Name | Type | Description |
orderBy |
String |
Ordering to apply. |
Return values:
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:
Name | Type | Description |
condition |
String |
Condition to add to the selector. |
Return values:
withLimit(limit)
Specifies limit for the selector to use. For instance,
withLimit(50)
returns only the first 50 entities.
Arguments:
Name | Type | Description |
limit |
int |
How many entities to return. |
Return values:
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-28 UTC."],[[["The `AdParamSelector` fetches ad parameters but doesn't allow filtering or sorting."],["It provides methods like `get()` to retrieve ad parameters using an iterator."],["Though it states no filtering/sorting, it has methods like `withCondition`, `withLimit`, and `orderBy` which contradict this and provide these functionalities."],["Related resources include `AdParamIterator` and `AdParam` for working with the retrieved data."]]],[]]