list method

Future<RemarketingListsListResponse> list(
  1. String profileId,
  2. String advertiserId, {
  3. bool? active,
  4. String? floodlightActivityId,
  5. int? maxResults,
  6. String? name,
  7. String? pageToken,
  8. String? sortField,
  9. String? sortOrder,
  10. String? $fields,
})

Retrieves a list of remarketing lists, possibly filtered.

This method supports paging.

Request parameters:

profileId - User profile ID associated with this request. Value must have pattern ^\[^/\]+$.

advertiserId - Required. Select only remarketing lists owned by this advertiser.

active - Select only active or only inactive remarketing lists.

floodlightActivityId - Select only remarketing lists that have this floodlight activity ID.

maxResults - Maximum number of results to return.

name - Allows searching for objects by name or ID. Wildcards () are allowed. For example, "remarketing list2015" will return objects with names like "remarketing list June 2015", "remarketing list April 2015", or simply "remarketing list 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 "remarketing list" will match objects with name "my remarketing list", "remarketing list 2015", or simply "remarketing list".

pageToken - Value of the nextPageToken from the previous result page.

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 RemarketingListsListResponse.

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<RemarketingListsListResponse> list(
  core.String profileId,
  core.String advertiserId, {
  core.bool? active,
  core.String? floodlightActivityId,
  core.int? maxResults,
  core.String? name,
  core.String? pageToken,
  core.String? sortField,
  core.String? sortOrder,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'advertiserId': [advertiserId],
    if (active != null) 'active': ['${active}'],
    if (floodlightActivityId != null)
      'floodlightActivityId': [floodlightActivityId],
    if (maxResults != null) 'maxResults': ['${maxResults}'],
    if (name != null) 'name': [name],
    if (pageToken != null) 'pageToken': [pageToken],
    if (sortField != null) 'sortField': [sortField],
    if (sortOrder != null) 'sortOrder': [sortOrder],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'userprofiles/' +
      core.Uri.encodeFull('$profileId') +
      '/remarketingLists';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return RemarketingListsListResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}