list method

Future<CampaignCreativeAssociationsListResponse> list(
  1. String profileId,
  2. String campaignId, {
  3. int? maxResults,
  4. String? pageToken,
  5. String? sortOrder,
  6. String? $fields,
})

Retrieves the list of creative IDs associated with the specified campaign.

This method supports paging.

Request parameters:

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

campaignId - Campaign ID in this association. Value must have pattern ^\[^/\]+$.

maxResults - Maximum number of results to return.

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

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

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

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

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