list method

Future<AdvertiserLandingPagesListResponse> list(
  1. String profileId, {
  2. List<String>? advertiserIds,
  3. bool? archived,
  4. List<String>? campaignIds,
  5. List<String>? ids,
  6. int? maxResults,
  7. String? pageToken,
  8. String? searchString,
  9. String? sortField,
  10. String? sortOrder,
  11. String? subaccountId,
  12. String? $fields,
})

Retrieves a list of landing pages.

Request parameters:

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

advertiserIds - Select only landing pages that belong to these advertisers.

archived - Select only archived landing pages. Don't set this field to select both archived and non-archived landing pages.

campaignIds - Select only landing pages that are associated with these campaigns.

ids - Select only landing pages with these IDs.

maxResults - Maximum number of results to return.

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

searchString - Allows searching for landing pages by name or ID. Wildcards () are allowed. For example, "landingpage2017" will return landing pages with names like "landingpage July 2017", "landingpage March 2017", or simply "landingpage 2017". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "landingpage" will match campaigns with name "my landingpage", "landingpage 2015", or simply "landingpage".

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.

subaccountId - Select only landing pages that belong to this subaccount.

$fields - Selector specifying which fields to include in a partial response.

Completes with a AdvertiserLandingPagesListResponse.

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<AdvertiserLandingPagesListResponse> list(
  core.String profileId, {
  core.List<core.String>? advertiserIds,
  core.bool? archived,
  core.List<core.String>? campaignIds,
  core.List<core.String>? ids,
  core.int? maxResults,
  core.String? pageToken,
  core.String? searchString,
  core.String? sortField,
  core.String? sortOrder,
  core.String? subaccountId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (advertiserIds != null) 'advertiserIds': advertiserIds,
    if (archived != null) 'archived': ['${archived}'],
    if (campaignIds != null) 'campaignIds': campaignIds,
    if (ids != null) 'ids': ids,
    if (maxResults != null) 'maxResults': ['${maxResults}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (searchString != null) 'searchString': [searchString],
    if (sortField != null) 'sortField': [sortField],
    if (sortOrder != null) 'sortOrder': [sortOrder],
    if (subaccountId != null) 'subaccountId': [subaccountId],
    if ($fields != null) 'fields': [$fields],
  };

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

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