Class: Google::Apis::DoubleclicksearchV2::DoubleclicksearchService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DoubleclicksearchV2::DoubleclicksearchService
- Defined in:
- lib/google/apis/doubleclicksearch_v2/service.rb
Overview
Search Ads 360 API
The Search Ads 360 API allows developers to automate uploading conversions and downloading reports from Search Ads 360.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://doubleclicksearch.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#generate_report(report_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::Report
Generates and returns a report immediately.
-
#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, customer_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::ConversionList
Retrieves a list of conversions from a DoubleClick Search engine account.
-
#get_conversion_by_customer_id(customer_id, end_date, row_count, start_date, start_row, ad_group_id: nil, ad_id: nil, advertiser_id: nil, agency_id: nil, campaign_id: nil, criterion_id: nil, engine_account_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::ConversionList
Retrieves a list of conversions from a DoubleClick Search engine account.
-
#get_report(report_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::Report
Polls for the status of a report request.
-
#get_report_file(report_id, report_fragment, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... }
Downloads a report file encoded in UTF-8.
-
#get_report_id_mapping_file(agency_id, advertiser_id, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::IdMappingFile
Downloads a csv file(encoded in UTF-8) that contains ID mappings between legacy SA360 and new SA360.
-
#initialize ⇒ DoubleclicksearchService
constructor
A new instance of DoubleclicksearchService.
-
#insert_conversion(conversion_list_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::ConversionList
Inserts a batch of new conversions into DoubleClick Search.
-
#list_saved_columns(agency_id, advertiser_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::SavedColumnList
Retrieve the list of saved columns for a specified advertiser.
-
#request_report(report_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::Report
Inserts a report request into the reporting system.
-
#update_conversion(conversion_list_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::ConversionList
Updates a batch of conversions in DoubleClick Search.
-
#update_conversion_availability(update_availability_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::UpdateAvailabilityResponse
Updates the availabilities of a batch of floodlight activities in DoubleClick Search.
Constructor Details
#initialize ⇒ DoubleclicksearchService
Returns a new instance of DoubleclicksearchService.
48 49 50 51 52 53 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-doubleclicksearch_v2', client_version: Google::Apis::DoubleclicksearchV2::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
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.
41 42 43 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 41 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
46 47 48 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#generate_report(report_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::Report
Generates and returns a report immediately.
291 292 293 294 295 296 297 298 299 300 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 291 def generate_report(report_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'doubleclicksearch/v2/reports/generate', ) 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? 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, customer_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::ConversionList
Retrieves a list of conversions from a DoubleClick Search engine account.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 97 def 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, customer_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/engine/{engineAccountId}/conversion', ) 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'] = engine_account_id unless engine_account_id.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['customerId'] = customer_id unless customer_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? execute_or_queue_command(command, &block) end |
#get_conversion_by_customer_id(customer_id, end_date, row_count, start_date, start_row, ad_group_id: nil, ad_id: nil, advertiser_id: nil, agency_id: nil, campaign_id: nil, criterion_id: nil, engine_account_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::ConversionList
Retrieves a list of conversions from a DoubleClick Search engine account.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 160 def get_conversion_by_customer_id(customer_id, end_date, row_count, start_date, start_row, ad_group_id: nil, ad_id: nil, advertiser_id: nil, agency_id: nil, campaign_id: nil, criterion_id: nil, engine_account_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'doubleclicksearch/v2/customer/{customerId}/conversion', ) command.response_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation command.response_class = Google::Apis::DoubleclicksearchV2::ConversionList command.params['customerId'] = customer_id unless customer_id.nil? command.query['adGroupId'] = ad_group_id unless ad_group_id.nil? command.query['adId'] = ad_id unless ad_id.nil? command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['agencyId'] = agency_id unless agency_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['engineAccountId'] = engine_account_id unless engine_account_id.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? execute_or_queue_command(command, &block) end |
#get_report(report_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::Report
Polls for the status of a report request.
322 323 324 325 326 327 328 329 330 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 322 def get_report(report_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'doubleclicksearch/v2/reports/{reportId}', ) 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? execute_or_queue_command(command, &block) end |
#get_report_file(report_id, report_fragment, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Downloads a report file encoded in UTF-8.
356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 356 def get_report_file(report_id, report_fragment, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'doubleclicksearch/v2/reports/{reportId}/files/{reportFragment}', ) else command = make_download_command(:get, 'doubleclicksearch/v2/reports/{reportId}/files/{reportFragment}', ) 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? execute_or_queue_command(command, &block) end |
#get_report_id_mapping_file(agency_id, advertiser_id, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::IdMappingFile
Downloads a csv file(encoded in UTF-8) that contains ID mappings between legacy SA360 and new SA360. The file includes all children entities of the given advertiser(e.g. engine accounts, campaigns, ad groups, etc.) that exist in both legacy SA360 and new SA360.
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 397 def get_report_id_mapping_file(agency_id, advertiser_id, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/idmapping', ) else command = make_download_command(:get, 'doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/idmapping', ) command.download_dest = download_dest end command.response_representation = Google::Apis::DoubleclicksearchV2::IdMappingFile::Representation command.response_class = Google::Apis::DoubleclicksearchV2::IdMappingFile 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? execute_or_queue_command(command, &block) end |
#insert_conversion(conversion_list_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::ConversionList
Inserts a batch of new conversions into DoubleClick Search.
200 201 202 203 204 205 206 207 208 209 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 200 def insert_conversion(conversion_list_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'doubleclicksearch/v2/conversion', ) 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? execute_or_queue_command(command, &block) end |
#list_saved_columns(agency_id, advertiser_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::SavedColumnList
Retrieve the list of saved columns for a specified advertiser.
465 466 467 468 469 470 471 472 473 474 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 465 def list_saved_columns(agency_id, advertiser_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/savedcolumns', ) 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? execute_or_queue_command(command, &block) end |
#request_report(report_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::Report
Inserts a report request into the reporting system.
432 433 434 435 436 437 438 439 440 441 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 432 def request_report(report_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'doubleclicksearch/v2/reports', ) 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? execute_or_queue_command(command, &block) end |
#update_conversion(conversion_list_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::ConversionList
Updates a batch of conversions in DoubleClick Search.
230 231 232 233 234 235 236 237 238 239 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 230 def update_conversion(conversion_list_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'doubleclicksearch/v2/conversion', ) 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? execute_or_queue_command(command, &block) end |
#update_conversion_availability(update_availability_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DoubleclicksearchV2::UpdateAvailabilityResponse
Updates the availabilities of a batch of floodlight activities in DoubleClick Search.
261 262 263 264 265 266 267 268 269 270 |
# File 'lib/google/apis/doubleclicksearch_v2/service.rb', line 261 def update_conversion_availability(update_availability_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'doubleclicksearch/v2/conversion/updateAvailability', ) 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? execute_or_queue_command(command, &block) end |