Class: Google::Apis::AdsensehostV4_1::AdSenseHostService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/adsensehost_v4_1/service.rb

Overview

AdSense Host API

Generates performance reports, generates ad codes, and provides publisher management capabilities for AdSense Hosts.

Examples:

require 'google/apis/adsensehost_v4_1'

Adsensehost = Google::Apis::AdsensehostV4_1 # Alias the module
service = Adsensehost::AdSenseHostService.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

#initializeAdSenseHostService


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

def initialize
  super('https://www.googleapis.com/', 'adsensehost/v4.1/')
  @batch_path = 'batch/adsensehost/v4.1'
end

Instance Attribute Details

#keyString


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

def key
  @key
end

#quota_userString


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

def quota_user
  @quota_user
end

#user_ipString


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

def user_ip
  @user_ip
end

Instance Method Details

#delete_account_ad_unit(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::AdUnit

Delete the specified ad unit from the specified publisher AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


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

def (, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:delete, 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
  command.params['accountId'] =  unless .nil?
  command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
  command.params['adUnitId'] = ad_unit_id unless ad_unit_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

#delete_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::CustomChannel

Delete a specific custom channel from the host AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


724
725
726
727
728
729
730
731
732
733
734
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 724

def delete_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:delete, 'adclients/{adClientId}/customchannels/{customChannelId}', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
  command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
  command.params['customChannelId'] = custom_channel_id unless custom_channel_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

#delete_url_channel(ad_client_id, url_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::UrlChannel

Delete a URL channel from the host AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 1012

def delete_url_channel(ad_client_id, url_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:delete, 'adclients/{adClientId}/urlchannels/{urlChannelId}', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::UrlChannel::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::UrlChannel
  command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
  command.params['urlChannelId'] = url_channel_id unless url_channel_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

#generate_account_report(account_id, start_date, end_date, dimension: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::Report

Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 532

def (, start_date, end_date, dimension: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'accounts/{accountId}/reports', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::Report::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::Report
  command.params['accountId'] =  unless .nil?
  command.query['dimension'] = dimension unless dimension.nil?
  command.query['endDate'] = end_date unless end_date.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['locale'] = locale unless locale.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['metric'] = metric unless metric.nil?
  command.query['sort'] = sort unless sort.nil?
  command.query['startDate'] = start_date unless start_date.nil?
  command.query['startIndex'] = start_index unless start_index.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

#generate_report(start_date, end_date, dimension: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::Report

Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 969

def generate_report(start_date, end_date, dimension: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'reports', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::Report::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::Report
  command.query['dimension'] = dimension unless dimension.nil?
  command.query['endDate'] = end_date unless end_date.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['locale'] = locale unless locale.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['metric'] = metric unless metric.nil?
  command.query['sort'] = sort unless sort.nil?
  command.query['startDate'] = start_date unless start_date.nil?
  command.query['startIndex'] = start_index unless start_index.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_account(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::Account

Get information about the selected associated AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


77
78
79
80
81
82
83
84
85
86
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 77

def (, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'accounts/{accountId}', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::
  command.params['accountId'] =  unless .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_account_ad_client(account_id, ad_client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::AdClient

Get information about one of the ad clients in the specified publisher's AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


146
147
148
149
150
151
152
153
154
155
156
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 146

def (, ad_client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::AdClient::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::AdClient
  command.params['accountId'] =  unless .nil?
  command.params['adClientId'] = ad_client_id unless ad_client_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_account_ad_unit(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::AdUnit

Get the specified host ad unit in this AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


264
265
266
267
268
269
270
271
272
273
274
275
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 264

def (, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
  command.params['accountId'] =  unless .nil?
  command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
  command.params['adUnitId'] = ad_unit_id unless ad_unit_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_account_ad_unit_ad_code(account_id, ad_client_id, ad_unit_id, host_custom_channel_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::AdCode

Get ad code for the specified ad unit, attaching the specified host custom channels.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


306
307
308
309
310
311
312
313
314
315
316
317
318
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 306

def (, ad_client_id, ad_unit_id, host_custom_channel_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::AdCode::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::AdCode
  command.params['accountId'] =  unless .nil?
  command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
  command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
  command.query['hostCustomChannelId'] = host_custom_channel_id unless host_custom_channel_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_ad_client(ad_client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::AdClient

Get information about one of the ad clients in the Host AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


574
575
576
577
578
579
580
581
582
583
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 574

def get_ad_client(ad_client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'adclients/{adClientId}', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::AdClient::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::AdClient
  command.params['adClientId'] = ad_client_id unless ad_client_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_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::CustomChannel

Get a specific custom channel from the host AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


760
761
762
763
764
765
766
767
768
769
770
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 760

def get_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'adclients/{adClientId}/customchannels/{customChannelId}', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
  command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
  command.params['customChannelId'] = custom_channel_id unless custom_channel_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

#insert_account_ad_unit(account_id, ad_client_id, ad_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::AdUnit

Insert the supplied ad unit into the specified publisher AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 345

def (, ad_client_id, ad_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'accounts/{accountId}/adclients/{adClientId}/adunits', options)
  command.request_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
  command.request_object = ad_unit_object
  command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
  command.params['accountId'] =  unless .nil?
  command.params['adClientId'] = ad_client_id unless ad_client_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

#insert_custom_channel(ad_client_id, custom_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::CustomChannel

Add a new custom channel to the host AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


795
796
797
798
799
800
801
802
803
804
805
806
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 795

def insert_custom_channel(ad_client_id, custom_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'adclients/{adClientId}/customchannels', options)
  command.request_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
  command.request_object = custom_channel_object
  command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
  command.params['adClientId'] = ad_client_id unless ad_client_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

#insert_url_channel(ad_client_id, url_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::UrlChannel

Add a new URL channel to the host AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 1047

def insert_url_channel(ad_client_id, url_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'adclients/{adClientId}/urlchannels', options)
  command.request_representation = Google::Apis::AdsensehostV4_1::UrlChannel::Representation
  command.request_object = url_channel_object
  command.response_representation = Google::Apis::AdsensehostV4_1::UrlChannel::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::UrlChannel
  command.params['adClientId'] = ad_client_id unless ad_client_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

#list_account_ad_clients(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::AdClients

List all hosted ad clients in the specified hosted account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


186
187
188
189
190
191
192
193
194
195
196
197
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 186

def (, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'accounts/{accountId}/adclients', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::AdClients::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::AdClients
  command.params['accountId'] =  unless .nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.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

#list_account_ad_units(account_id, ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::AdUnits

List all ad units in the specified publisher's AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


390
391
392
393
394
395
396
397
398
399
400
401
402
403
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 390

def (, ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::AdUnits::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::AdUnits
  command.params['accountId'] =  unless .nil?
  command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
  command.query['includeInactive'] = include_inactive unless include_inactive.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.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

#list_accounts(filter_ad_client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::Accounts

List hosted accounts associated with this AdSense account by ad client id.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


110
111
112
113
114
115
116
117
118
119
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 110

def list_accounts(filter_ad_client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'accounts', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::Accounts::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::Accounts
  command.query['filterAdClientId'] = filter_ad_client_id unless filter_ad_client_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

#list_ad_clients(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::AdClients

List all host ad clients in this AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


611
612
613
614
615
616
617
618
619
620
621
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 611

def list_ad_clients(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'adclients', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::AdClients::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::AdClients
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.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

#list_custom_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::CustomChannels

List all host custom channels in this AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


837
838
839
840
841
842
843
844
845
846
847
848
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 837

def list_custom_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'adclients/{adClientId}/customchannels', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannels::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::CustomChannels
  command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.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

#list_url_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::UrlChannels

List all host URL channels in the host AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 1088

def list_url_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'adclients/{adClientId}/urlchannels', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::UrlChannels::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::UrlChannels
  command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.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_account_ad_unit(account_id, ad_client_id, ad_unit_id, ad_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::AdUnit

Update the supplied ad unit in the specified publisher AdSense account. This method supports patch semantics.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


433
434
435
436
437
438
439
440
441
442
443
444
445
446
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 433

def (, ad_client_id, ad_unit_id, ad_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:patch, 'accounts/{accountId}/adclients/{adClientId}/adunits', options)
  command.request_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
  command.request_object = ad_unit_object
  command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
  command.params['accountId'] =  unless .nil?
  command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
  command.query['adUnitId'] = ad_unit_id unless ad_unit_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_custom_channel(ad_client_id, custom_channel_id, custom_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::CustomChannel

Update a custom channel in the host AdSense account. This method supports patch semantics.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


876
877
878
879
880
881
882
883
884
885
886
887
888
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 876

def patch_custom_channel(ad_client_id, custom_channel_id, custom_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:patch, 'adclients/{adClientId}/customchannels', options)
  command.request_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
  command.request_object = custom_channel_object
  command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
  command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
  command.query['customChannelId'] = custom_channel_id unless custom_channel_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

#start_association_session(product_code, website_url, user_locale: nil, website_locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::AssociationSession

Create an association session for initiating an association with an AdSense user.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


652
653
654
655
656
657
658
659
660
661
662
663
664
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 652

def start_association_session(product_code, website_url, user_locale: nil, website_locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'associationsessions/start', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::AssociationSession::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::AssociationSession
  command.query['productCode'] = product_code unless product_code.nil?
  command.query['userLocale'] = user_locale unless user_locale.nil?
  command.query['websiteLocale'] = website_locale unless website_locale.nil?
  command.query['websiteUrl'] = website_url unless website_url.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

#update_account_ad_unit(account_id, ad_client_id, ad_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::AdUnit

Update the supplied ad unit in the specified publisher AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


473
474
475
476
477
478
479
480
481
482
483
484
485
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 473

def (, ad_client_id, ad_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:put, 'accounts/{accountId}/adclients/{adClientId}/adunits', options)
  command.request_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
  command.request_object = ad_unit_object
  command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
  command.params['accountId'] =  unless .nil?
  command.params['adClientId'] = ad_client_id unless ad_client_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

#update_custom_channel(ad_client_id, custom_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::CustomChannel

Update a custom channel in the host AdSense account.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


913
914
915
916
917
918
919
920
921
922
923
924
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 913

def update_custom_channel(ad_client_id, custom_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:put, 'adclients/{adClientId}/customchannels', options)
  command.request_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
  command.request_object = custom_channel_object
  command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
  command.params['adClientId'] = ad_client_id unless ad_client_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

#verify_association_session(token, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsensehostV4_1::AssociationSession

Verify an association session after the association callback returns from AdSense signup.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


689
690
691
692
693
694
695
696
697
698
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 689

def verify_association_session(token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'associationsessions/verify', options)
  command.response_representation = Google::Apis::AdsensehostV4_1::AssociationSession::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::AssociationSession
  command.query['token'] = token unless token.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