list method
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>>{
'maxResults': ?maxResults == null ? null : ['${maxResults}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'sortOrder': ?sortOrder == null ? null : [sortOrder],
'fields': ?$fields == null ? null : [$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>,
);
}