get method

Future<ConversionList> get(
  1. String agencyId,
  2. String advertiserId,
  3. String engineAccountId,
  4. int endDate,
  5. int rowCount,
  6. int startDate,
  7. int startRow, {
  8. String? adGroupId,
  9. String? adId,
  10. String? campaignId,
  11. String? criterionId,
  12. String? customerId,
  13. String? $fields,
})

Retrieves a list of conversions from a DoubleClick Search engine account.

Request parameters:

agencyId - Numeric ID of the agency.

advertiserId - Numeric ID of the advertiser.

engineAccountId - Numeric ID of the engine account.

endDate - Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. Value must be between "20091101" and "99991231".

rowCount - The number of conversions to return per call. Value must be between "1" and "1000".

startDate - First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. Value must be between "20091101" and "99991231".

startRow - The 0-based starting index for retrieving conversions results.

adGroupId - Numeric ID of the ad group.

adId - Numeric ID of the ad.

campaignId - Numeric ID of the campaign.

criterionId - Numeric ID of the criterion.

customerId - Customer ID of a client account in the new Search Ads 360 experience.

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

Completes with a ConversionList.

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<ConversionList> get(
  core.String agencyId,
  core.String advertiserId,
  core.String engineAccountId,
  core.int endDate,
  core.int rowCount,
  core.int startDate,
  core.int startRow, {
  core.String? adGroupId,
  core.String? adId,
  core.String? campaignId,
  core.String? criterionId,
  core.String? customerId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'endDate': ['${endDate}'],
    'rowCount': ['${rowCount}'],
    'startDate': ['${startDate}'],
    'startRow': ['${startRow}'],
    if (adGroupId != null) 'adGroupId': [adGroupId],
    if (adId != null) 'adId': [adId],
    if (campaignId != null) 'campaignId': [campaignId],
    if (criterionId != null) 'criterionId': [criterionId],
    if (customerId != null) 'customerId': [customerId],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'doubleclicksearch/v2/agency/' +
      commons.escapeVariable('$agencyId') +
      '/advertiser/' +
      commons.escapeVariable('$advertiserId') +
      '/engine/' +
      commons.escapeVariable('$engineAccountId') +
      '/conversion';

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