generatetags method

Future<PlacementsGenerateTagsResponse> generatetags(
  1. String profileId, {
  2. String? campaignId,
  3. List<String>? placementIds,
  4. List<String>? tagFormats,
  5. String? $fields,
})

Generates tags for a placement.

Request parameters:

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

campaignId - Generate placements belonging to this campaign. This is a required field.

placementIds - Generate tags for these placements.

tagFormats - Tag formats to generate for these placements. Note: PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.

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

Completes with a PlacementsGenerateTagsResponse.

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<PlacementsGenerateTagsResponse> generatetags(
  core.String profileId, {
  core.String? campaignId,
  core.List<core.String>? placementIds,
  core.List<core.String>? tagFormats,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (campaignId != null) 'campaignId': [campaignId],
    if (placementIds != null) 'placementIds': placementIds,
    if (tagFormats != null) 'tagFormats': tagFormats,
    if ($fields != null) 'fields': [$fields],
  };

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

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