list method
- String profileId, {
- List<
String> ? activeStatus, - List<
String> ? advertiserIds, - List<
String> ? campaignIds, - List<
String> ? contentCategoryIds, - List<
String> ? directorySiteIds, - List<
String> ? ids, - String? maxEndDate,
- int? maxResults,
- String? maxStartDate,
- String? minEndDate,
- String? minStartDate,
- String? pageToken,
- String? placementGroupType,
- List<
String> ? placementStrategyIds, - List<
String> ? pricingTypes, - String? searchString,
- List<
String> ? siteIds, - String? sortField,
- String? sortOrder,
- String? $fields,
Retrieves a list of placement groups, possibly filtered.
This method supports paging.
Request parameters:
profileId
- User profile ID associated with this request.
Value must have pattern ^\[^/\]+$
.
activeStatus
- Select only placements with these active statuses.
advertiserIds
- Select only placement groups that belong to these
advertisers.
campaignIds
- Select only placement groups that belong to these
campaigns.
contentCategoryIds
- Select only placement groups that are associated
with these content categories.
directorySiteIds
- Select only placement groups that are associated with
these directory sites.
ids
- Select only placement groups with these IDs.
maxEndDate
- Select only placements or placement groups whose end date
is on or before the specified maxEndDate. The date should be formatted as
"yyyy-MM-dd".
maxResults
- Maximum number of results to return.
maxStartDate
- Select only placements or placement groups whose start
date is on or before the specified maxStartDate. The date should be
formatted as "yyyy-MM-dd".
minEndDate
- Select only placements or placement groups whose end date
is on or after the specified minEndDate. The date should be formatted as
"yyyy-MM-dd".
minStartDate
- Select only placements or placement groups whose start
date is on or after the specified minStartDate. The date should be
formatted as "yyyy-MM-dd".
pageToken
- Value of the nextPageToken from the previous result page.
placementGroupType
- Select only placement groups belonging with this
group type. A package is a simple group of placements that acts as a
single pricing point for a group of tags. A roadblock is a group of
placements that not only acts as a single pricing point but also assumes
that all the tags in it will be served at the same time. A roadblock
requires one of its assigned placements to be marked as primary for
reporting.
Possible string values are:
- "PLACEMENT_PACKAGE" : A simple group of site-placements (tags). Basically acts as a single pricing point for a group of tags.
- "PLACEMENT_ROADBLOCK" : A group of site-placements (tags) that not only acts as a single pricing point but also assumes that all the tags in it will be served at the same time. This kind of group requires one of its assigned site-placements to be marked as primary for reporting purposes.
placementStrategyIds
- Select only placement groups that are associated
with these placement strategies.
pricingTypes
- Select only placement groups with these pricing types.
searchString
- Allows searching for placement groups by name or ID.
Wildcards () are allowed. For example, "placement2015" will return
placement groups with names like "placement group June 2015", "placement
group May 2015", or simply "placements 2015". Most of the searches also
add wildcards implicitly at the start and the end of the search string.
For example, a search string of "placementgroup" will match placement
groups with name "my placementgroup", "placementgroup 2015", or simply
"placementgroup".
siteIds
- Select only placement groups that are associated with these
sites.
sortField
- Field by which to sort the list.
Possible string values are:
- "ID"
- "NAME"
sortOrder
- Order of sorted results.
Possible string values are:
- "ASCENDING" : Ascending order.
- "DESCENDING" : Descending order.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a PlacementGroupsListResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<PlacementGroupsListResponse> list(
core.String profileId, {
core.List<core.String>? activeStatus,
core.List<core.String>? advertiserIds,
core.List<core.String>? campaignIds,
core.List<core.String>? contentCategoryIds,
core.List<core.String>? directorySiteIds,
core.List<core.String>? ids,
core.String? maxEndDate,
core.int? maxResults,
core.String? maxStartDate,
core.String? minEndDate,
core.String? minStartDate,
core.String? pageToken,
core.String? placementGroupType,
core.List<core.String>? placementStrategyIds,
core.List<core.String>? pricingTypes,
core.String? searchString,
core.List<core.String>? siteIds,
core.String? sortField,
core.String? sortOrder,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (activeStatus != null) 'activeStatus': activeStatus,
if (advertiserIds != null) 'advertiserIds': advertiserIds,
if (campaignIds != null) 'campaignIds': campaignIds,
if (contentCategoryIds != null) 'contentCategoryIds': contentCategoryIds,
if (directorySiteIds != null) 'directorySiteIds': directorySiteIds,
if (ids != null) 'ids': ids,
if (maxEndDate != null) 'maxEndDate': [maxEndDate],
if (maxResults != null) 'maxResults': ['${maxResults}'],
if (maxStartDate != null) 'maxStartDate': [maxStartDate],
if (minEndDate != null) 'minEndDate': [minEndDate],
if (minStartDate != null) 'minStartDate': [minStartDate],
if (pageToken != null) 'pageToken': [pageToken],
if (placementGroupType != null)
'placementGroupType': [placementGroupType],
if (placementStrategyIds != null)
'placementStrategyIds': placementStrategyIds,
if (pricingTypes != null) 'pricingTypes': pricingTypes,
if (searchString != null) 'searchString': [searchString],
if (siteIds != null) 'siteIds': siteIds,
if (sortField != null) 'sortField': [sortField],
if (sortOrder != null) 'sortOrder': [sortOrder],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'userprofiles/' +
core.Uri.encodeFull('$profileId') +
'/placementGroups';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return PlacementGroupsListResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}