Class: Google::Apis::DoubleclicksearchV2::DoubleclicksearchService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
generated/google/apis/doubleclicksearch_v2/service.rb

Overview

DoubleClick Search API

Reports and modifies your advertising data in DoubleClick Search (for example, campaigns, ad groups, keywords, and conversions).

Examples:

require 'google/apis/doubleclicksearch_v2'

Doubleclicksearch = Google::Apis::DoubleclicksearchV2 # Alias the module
service = Doubleclicksearch::DoubleclicksearchService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeDoubleclicksearchService

Returns a new instance of DoubleclicksearchService



50
51
52
53
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 50

def initialize
  super('https://www.googleapis.com/', 'doubleclicksearch/v2/')
  @batch_path = 'batch/doubleclicksearch/v2'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



39
40
41
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 39

def key
  @key
end

#quota_userString

Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Returns:

  • (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.



44
45
46
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 44

def quota_user
  @quota_user
end

#user_ipString

Returns Deprecated. Please use quotaUser instead.

Returns:

  • (String)

    Deprecated. Please use quotaUser instead.



48
49
50
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 48

def user_ip
  @user_ip
end

Instance Method Details

#generate_report(report_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::Report

Generates and returns a report immediately.

Parameters:

  • report_request_object (Google::Apis::DoubleclicksearchV2::ReportRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



294
295
296
297
298
299
300
301
302
303
304
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 294

def generate_report(report_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'reports/generate', options)
  command.request_representation = Google::Apis::DoubleclicksearchV2::ReportRequest::Representation
  command.request_object = report_request_object
  command.response_representation = Google::Apis::DoubleclicksearchV2::Report::Representation
  command.response_class = Google::Apis::DoubleclicksearchV2::Report
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_conversion(agency_id, advertiser_id, engine_account_id, end_date, row_count, start_date, start_row, ad_group_id: nil, ad_id: nil, campaign_id: nil, criterion_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::ConversionList

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

Parameters:

  • agency_id (Fixnum)

    Numeric ID of the agency.

  • advertiser_id (Fixnum)

    Numeric ID of the advertiser.

  • engine_account_id (Fixnum)

    Numeric ID of the engine account.

  • end_date (Fixnum)

    Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd.

  • row_count (Fixnum)

    The number of conversions to return per call.

  • start_date (Fixnum)

    First date (inclusive) on which to retrieve conversions. Format is yyyymmdd.

  • start_row (Fixnum)

    The 0-based starting index for retrieving conversions results.

  • ad_group_id (Fixnum)

    Numeric ID of the ad group.

  • ad_id (Fixnum)

    Numeric ID of the ad.

  • campaign_id (Fixnum)

    Numeric ID of the campaign.

  • criterion_id (Fixnum)

    Numeric ID of the criterion.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 97

def get_conversion(agency_id, advertiser_id, , end_date, row_count, start_date, start_row, ad_group_id: nil, ad_id: nil, campaign_id: nil, criterion_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'agency/{agencyId}/advertiser/{advertiserId}/engine/{engineAccountId}/conversion', options)
  command.response_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation
  command.response_class = Google::Apis::DoubleclicksearchV2::ConversionList
  command.params['agencyId'] = agency_id unless agency_id.nil?
  command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
  command.params['engineAccountId'] =  unless .nil?
  command.query['adGroupId'] = ad_group_id unless ad_group_id.nil?
  command.query['adId'] = ad_id unless ad_id.nil?
  command.query['campaignId'] = campaign_id unless campaign_id.nil?
  command.query['criterionId'] = criterion_id unless criterion_id.nil?
  command.query['endDate'] = end_date unless end_date.nil?
  command.query['rowCount'] = row_count unless row_count.nil?
  command.query['startDate'] = start_date unless start_date.nil?
  command.query['startRow'] = start_row unless start_row.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_report(report_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::Report

Polls for the status of a report request.

Parameters:

  • report_id (String)

    ID of the report request being polled.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



328
329
330
331
332
333
334
335
336
337
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 328

def get_report(report_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'reports/{reportId}', options)
  command.response_representation = Google::Apis::DoubleclicksearchV2::Report::Representation
  command.response_class = Google::Apis::DoubleclicksearchV2::Report
  command.params['reportId'] = report_id unless report_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_report_file(report_id, report_fragment, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Downloads a report file encoded in UTF-8.

Parameters:

  • report_id (String)

    ID of the report.

  • report_fragment (Fixnum)

    The index of the report fragment to download.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • download_dest (IO, String)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



365
366
367
368
369
370
371
372
373
374
375
376
377
378
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 365

def get_report_file(report_id, report_fragment, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
  if download_dest.nil?
    command =  make_simple_command(:get, 'reports/{reportId}/files/{reportFragment}', options)
  else
    command = make_download_command(:get, 'reports/{reportId}/files/{reportFragment}', options)
    command.download_dest = download_dest
  end
  command.params['reportId'] = report_id unless report_id.nil?
  command.params['reportFragment'] = report_fragment unless report_fragment.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_conversion(conversion_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::ConversionList

Inserts a batch of new conversions into DoubleClick Search.

Parameters:

  • conversion_list_object (Google::Apis::DoubleclicksearchV2::ConversionList) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



139
140
141
142
143
144
145
146
147
148
149
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 139

def insert_conversion(conversion_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'conversion', options)
  command.request_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation
  command.request_object = conversion_list_object
  command.response_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation
  command.response_class = Google::Apis::DoubleclicksearchV2::ConversionList
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_saved_columns(agency_id, advertiser_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::SavedColumnList

Retrieve the list of saved columns for a specified advertiser.

Parameters:

  • agency_id (Fixnum)

    DS ID of the agency.

  • advertiser_id (Fixnum)

    DS ID of the advertiser.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



437
438
439
440
441
442
443
444
445
446
447
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 437

def list_saved_columns(agency_id, advertiser_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'agency/{agencyId}/advertiser/{advertiserId}/savedcolumns', options)
  command.response_representation = Google::Apis::DoubleclicksearchV2::SavedColumnList::Representation
  command.response_class = Google::Apis::DoubleclicksearchV2::SavedColumnList
  command.params['agencyId'] = agency_id unless agency_id.nil?
  command.params['advertiserId'] = advertiser_id unless advertiser_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_conversion(advertiser_id, agency_id, end_date, engine_account_id, row_count, start_date, start_row, conversion_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::ConversionList

Updates a batch of conversions in DoubleClick Search. This method supports patch semantics.

Parameters:

  • advertiser_id (Fixnum)

    Numeric ID of the advertiser.

  • agency_id (Fixnum)

    Numeric ID of the agency.

  • end_date (Fixnum)

    Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd.

  • engine_account_id (Fixnum)

    Numeric ID of the engine account.

  • row_count (Fixnum)

    The number of conversions to return per call.

  • start_date (Fixnum)

    First date (inclusive) on which to retrieve conversions. Format is yyyymmdd.

  • start_row (Fixnum)

    The 0-based starting index for retrieving conversions results.

  • conversion_list_object (Google::Apis::DoubleclicksearchV2::ConversionList) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 187

def patch_conversion(advertiser_id, agency_id, end_date, , row_count, start_date, start_row, conversion_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'conversion', options)
  command.request_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation
  command.request_object = conversion_list_object
  command.response_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation
  command.response_class = Google::Apis::DoubleclicksearchV2::ConversionList
  command.query['advertiserId'] = advertiser_id unless advertiser_id.nil?
  command.query['agencyId'] = agency_id unless agency_id.nil?
  command.query['endDate'] = end_date unless end_date.nil?
  command.query['engineAccountId'] =  unless .nil?
  command.query['rowCount'] = row_count unless row_count.nil?
  command.query['startDate'] = start_date unless start_date.nil?
  command.query['startRow'] = start_row unless start_row.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#request_report(report_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::Report

Inserts a report request into the reporting system.

Parameters:

  • report_request_object (Google::Apis::DoubleclicksearchV2::ReportRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



401
402
403
404
405
406
407
408
409
410
411
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 401

def request_report(report_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'reports', options)
  command.request_representation = Google::Apis::DoubleclicksearchV2::ReportRequest::Representation
  command.request_object = report_request_object
  command.response_representation = Google::Apis::DoubleclicksearchV2::Report::Representation
  command.response_class = Google::Apis::DoubleclicksearchV2::Report
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_conversion(conversion_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::ConversionList

Updates a batch of conversions in DoubleClick Search.

Parameters:

  • conversion_list_object (Google::Apis::DoubleclicksearchV2::ConversionList) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



227
228
229
230
231
232
233
234
235
236
237
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 227

def update_conversion(conversion_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'conversion', options)
  command.request_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation
  command.request_object = conversion_list_object
  command.response_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation
  command.response_class = Google::Apis::DoubleclicksearchV2::ConversionList
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_conversion_availability(update_availability_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::UpdateAvailabilityResponse

Updates the availabilities of a batch of floodlight activities in DoubleClick Search.

Parameters:

  • update_availability_request_object (Google::Apis::DoubleclicksearchV2::UpdateAvailabilityRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



261
262
263
264
265
266
267
268
269
270
271
# File 'generated/google/apis/doubleclicksearch_v2/service.rb', line 261

def update_conversion_availability(update_availability_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'conversion/updateAvailability', options)
  command.request_representation = Google::Apis::DoubleclicksearchV2::UpdateAvailabilityRequest::Representation
  command.request_object = update_availability_request_object
  command.response_representation = Google::Apis::DoubleclicksearchV2::UpdateAvailabilityResponse::Representation
  command.response_class = Google::Apis::DoubleclicksearchV2::UpdateAvailabilityResponse
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end