Class: Google::Apis::AdsenseV2::AdsenseService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::AdsenseV2::AdsenseService
- Defined in:
- lib/google/apis/adsense_v2/service.rb
Overview
AdSense Management API
The AdSense Management API allows publishers to access their inventory and run earnings and performance reports.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://adsense.$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
-
#create_account_adclient_adunit(parent, ad_unit_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdUnit
Creates an ad unit.
-
#create_account_adclient_customchannel(parent, custom_channel_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::CustomChannel
Creates a custom channel.
-
#delete_account_adclient_customchannel(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::Empty
Deletes a custom channel.
-
#generate_account_report(account, currency_code: nil, date_range: nil, dimensions: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, filters: nil, language_code: nil, limit: nil, metrics: nil, order_by: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ReportResult
Generates an ad hoc report.
-
#generate_account_report_csv(account, currency_code: nil, date_range: nil, dimensions: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, filters: nil, language_code: nil, limit: nil, metrics: nil, order_by: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::HttpBody
Generates a csv formatted ad hoc report.
-
#generate_account_report_saved(name, currency_code: nil, date_range: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, language_code: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ReportResult
Generates a saved report.
-
#generate_account_report_saved_csv(name, currency_code: nil, date_range: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, language_code: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::HttpBody
Generates a csv formatted saved report.
-
#get_account(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::Account
Gets information about the selected AdSense account.
-
#get_account_ad_blocking_recovery_tag(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdBlockingRecoveryTag
Gets the ad blocking recovery tag of an account.
-
#get_account_adclient(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdClient
Gets the ad client from the given resource name.
-
#get_account_adclient_adcode(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdClientAdCode
Gets the AdSense code for a given ad client.
-
#get_account_adclient_adunit(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdUnit
Gets an ad unit from a specified account and ad client.
-
#get_account_adclient_adunit_adcode(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdUnitAdCode
Gets the ad unit code for a given ad unit.
-
#get_account_adclient_customchannel(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::CustomChannel
Gets information about the selected custom channel.
-
#get_account_adclient_urlchannel(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::UrlChannel
Gets information about the selected url channel.
-
#get_account_policy_issue(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::PolicyIssue
Gets information about the selected policy issue.
-
#get_account_report_saved(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::SavedReport
Gets the saved report from the given resource name.
-
#get_account_site(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::Site
Gets information about the selected site.
-
#initialize ⇒ AdsenseService
constructor
A new instance of AdsenseService.
-
#list_account_adclient_adunit_linked_custom_channels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListLinkedCustomChannelsResponse
Lists all the custom channels available for an ad unit.
-
#list_account_adclient_adunits(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListAdUnitsResponse
Lists all ad units under a specified account and ad client.
-
#list_account_adclient_customchannel_linked_ad_units(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListLinkedAdUnitsResponse
Lists all the ad units available for a custom channel.
-
#list_account_adclient_customchannels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListCustomChannelsResponse
Lists all the custom channels available in an ad client.
-
#list_account_adclient_urlchannels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListUrlChannelsResponse
Lists active url channels.
-
#list_account_adclients(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListAdClientsResponse
Lists all the ad clients available in an account.
-
#list_account_alerts(parent, language_code: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListAlertsResponse
Lists all the alerts available in an account.
-
#list_account_child_accounts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListChildAccountsResponse
Lists all accounts directly managed by the given AdSense account.
-
#list_account_payments(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListPaymentsResponse
Lists all the payments available for an account.
-
#list_account_policy_issues(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListPolicyIssuesResponse
Lists all the policy issues where the specified account is involved, both directly and through any AFP child accounts.
-
#list_account_report_saveds(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListSavedReportsResponse
Lists saved reports.
-
#list_account_sites(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListSitesResponse
Lists all the sites available in an account.
-
#list_accounts(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListAccountsResponse
Lists all accounts available to this user.
-
#patch_account_adclient_adunit(name, ad_unit_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdUnit
Updates an ad unit.
-
#patch_account_adclient_customchannel(name, custom_channel_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::CustomChannel
Updates a custom channel.
Constructor Details
#initialize ⇒ AdsenseService
Returns a new instance of AdsenseService.
48 49 50 51 52 53 |
# File 'lib/google/apis/adsense_v2/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-adsense_v2', client_version: Google::Apis::AdsenseV2::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/adsense_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/adsense_v2/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#create_account_adclient_adunit(parent, ad_unit_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdUnit
Creates an ad unit. This method can be called only by a restricted set of
projects, which are usually owned by AdSense for Platforms publishers. Contact your account
manager if you need to use this method. Note that ad units can only be created
for ad clients with an "AFC" product code. For more info see the AdClient
resource. For now,
this method can only be used to create DISPLAY
ad units. See: https://
support.google.com/adsense/answer/9183566
330 331 332 333 334 335 336 337 338 339 340 |
# File 'lib/google/apis/adsense_v2/service.rb', line 330 def create_account_adclient_adunit(parent, ad_unit_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/adunits', ) command.request_representation = Google::Apis::AdsenseV2::AdUnit::Representation command.request_object = ad_unit_object command.response_representation = Google::Apis::AdsenseV2::AdUnit::Representation command.response_class = Google::Apis::AdsenseV2::AdUnit command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_account_adclient_customchannel(parent, custom_channel_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::CustomChannel
Creates a custom channel. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers. Contact your account manager if you need to use this method.
557 558 559 560 561 562 563 564 565 566 567 |
# File 'lib/google/apis/adsense_v2/service.rb', line 557 def create_account_adclient_customchannel(parent, custom_channel_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/customchannels', ) command.request_representation = Google::Apis::AdsenseV2::CustomChannel::Representation command.request_object = custom_channel_object command.response_representation = Google::Apis::AdsenseV2::CustomChannel::Representation command.response_class = Google::Apis::AdsenseV2::CustomChannel command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_account_adclient_customchannel(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::Empty
Deletes a custom channel. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers. Contact your account manager if you need to use this method.
593 594 595 596 597 598 599 600 601 |
# File 'lib/google/apis/adsense_v2/service.rb', line 593 def delete_account_adclient_customchannel(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2/{+name}', ) command.response_representation = Google::Apis::AdsenseV2::Empty::Representation command.response_class = Google::Apis::AdsenseV2::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#generate_account_report(account, currency_code: nil, date_range: nil, dimensions: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, filters: nil, language_code: nil, limit: nil, metrics: nil, order_by: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ReportResult
Generates an ad hoc report.
1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 |
# File 'lib/google/apis/adsense_v2/service.rb', line 1045 def generate_account_report(account, currency_code: nil, date_range: nil, dimensions: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, filters: nil, language_code: nil, limit: nil, metrics: nil, order_by: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+account}/reports:generate', ) command.response_representation = Google::Apis::AdsenseV2::ReportResult::Representation command.response_class = Google::Apis::AdsenseV2::ReportResult command.params['account'] = account unless account.nil? command.query['currencyCode'] = currency_code unless currency_code.nil? command.query['dateRange'] = date_range unless date_range.nil? command.query['dimensions'] = dimensions unless dimensions.nil? command.query['endDate.day'] = end_date_day unless end_date_day.nil? command.query['endDate.month'] = end_date_month unless end_date_month.nil? command.query['endDate.year'] = end_date_year unless end_date_year.nil? command.query['filters'] = filters unless filters.nil? command.query['languageCode'] = language_code unless language_code.nil? command.query['limit'] = limit unless limit.nil? command.query['metrics'] = metrics unless metrics.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['reportingTimeZone'] = reporting_time_zone unless reporting_time_zone.nil? command.query['startDate.day'] = start_date_day unless start_date_day.nil? command.query['startDate.month'] = start_date_month unless start_date_month.nil? command.query['startDate.year'] = start_date_year unless start_date_year.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#generate_account_report_csv(account, currency_code: nil, date_range: nil, dimensions: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, filters: nil, language_code: nil, limit: nil, metrics: nil, order_by: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::HttpBody
Generates a csv formatted ad hoc report.
1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 |
# File 'lib/google/apis/adsense_v2/service.rb', line 1143 def generate_account_report_csv(account, currency_code: nil, date_range: nil, dimensions: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, filters: nil, language_code: nil, limit: nil, metrics: nil, order_by: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+account}/reports:generateCsv', ) command.response_representation = Google::Apis::AdsenseV2::HttpBody::Representation command.response_class = Google::Apis::AdsenseV2::HttpBody command.params['account'] = account unless account.nil? command.query['currencyCode'] = currency_code unless currency_code.nil? command.query['dateRange'] = date_range unless date_range.nil? command.query['dimensions'] = dimensions unless dimensions.nil? command.query['endDate.day'] = end_date_day unless end_date_day.nil? command.query['endDate.month'] = end_date_month unless end_date_month.nil? command.query['endDate.year'] = end_date_year unless end_date_year.nil? command.query['filters'] = filters unless filters.nil? command.query['languageCode'] = language_code unless language_code.nil? command.query['limit'] = limit unless limit.nil? command.query['metrics'] = metrics unless metrics.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['reportingTimeZone'] = reporting_time_zone unless reporting_time_zone.nil? command.query['startDate.day'] = start_date_day unless start_date_day.nil? command.query['startDate.month'] = start_date_month unless start_date_month.nil? command.query['startDate.year'] = start_date_year unless start_date_year.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#generate_account_report_saved(name, currency_code: nil, date_range: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, language_code: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ReportResult
Generates a saved report.
1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 |
# File 'lib/google/apis/adsense_v2/service.rb', line 1252 def generate_account_report_saved(name, currency_code: nil, date_range: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, language_code: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}/saved:generate', ) command.response_representation = Google::Apis::AdsenseV2::ReportResult::Representation command.response_class = Google::Apis::AdsenseV2::ReportResult command.params['name'] = name unless name.nil? command.query['currencyCode'] = currency_code unless currency_code.nil? command.query['dateRange'] = date_range unless date_range.nil? command.query['endDate.day'] = end_date_day unless end_date_day.nil? command.query['endDate.month'] = end_date_month unless end_date_month.nil? command.query['endDate.year'] = end_date_year unless end_date_year.nil? command.query['languageCode'] = language_code unless language_code.nil? command.query['reportingTimeZone'] = reporting_time_zone unless reporting_time_zone.nil? command.query['startDate.day'] = start_date_day unless start_date_day.nil? command.query['startDate.month'] = start_date_month unless start_date_month.nil? command.query['startDate.year'] = start_date_year unless start_date_year.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#generate_account_report_saved_csv(name, currency_code: nil, date_range: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, language_code: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::HttpBody
Generates a csv formatted saved report.
1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 |
# File 'lib/google/apis/adsense_v2/service.rb', line 1325 def generate_account_report_saved_csv(name, currency_code: nil, date_range: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, language_code: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}/saved:generateCsv', ) command.response_representation = Google::Apis::AdsenseV2::HttpBody::Representation command.response_class = Google::Apis::AdsenseV2::HttpBody command.params['name'] = name unless name.nil? command.query['currencyCode'] = currency_code unless currency_code.nil? command.query['dateRange'] = date_range unless date_range.nil? command.query['endDate.day'] = end_date_day unless end_date_day.nil? command.query['endDate.month'] = end_date_month unless end_date_month.nil? command.query['endDate.year'] = end_date_year unless end_date_year.nil? command.query['languageCode'] = language_code unless language_code.nil? command.query['reportingTimeZone'] = reporting_time_zone unless reporting_time_zone.nil? command.query['startDate.day'] = start_date_day unless start_date_day.nil? command.query['startDate.month'] = start_date_month unless start_date_month.nil? command.query['startDate.year'] = start_date_year unless start_date_year.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_account(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::Account
Gets information about the selected AdSense account.
75 76 77 78 79 80 81 82 83 |
# File 'lib/google/apis/adsense_v2/service.rb', line 75 def get_account(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::AdsenseV2::Account::Representation command.response_class = Google::Apis::AdsenseV2::Account command.params['name'] = name unless name.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_account_ad_blocking_recovery_tag(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdBlockingRecoveryTag
Gets the ad blocking recovery tag of an account.
106 107 108 109 110 111 112 113 114 |
# File 'lib/google/apis/adsense_v2/service.rb', line 106 def get_account_ad_blocking_recovery_tag(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}/adBlockingRecoveryTag', ) command.response_representation = Google::Apis::AdsenseV2::AdBlockingRecoveryTag::Representation command.response_class = Google::Apis::AdsenseV2::AdBlockingRecoveryTag command.params['name'] = name unless name.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_account_adclient(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdClient
Gets the ad client from the given resource name.
216 217 218 219 220 221 222 223 224 |
# File 'lib/google/apis/adsense_v2/service.rb', line 216 def get_account_adclient(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::AdsenseV2::AdClient::Representation command.response_class = Google::Apis::AdsenseV2::AdClient command.params['name'] = name unless name.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_account_adclient_adcode(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdClientAdCode
Gets the AdSense code for a given ad client. This returns what was previously known as the 'auto ad code'. This is only supported for ad clients with a product_code of AFC. For more information, see About the AdSense code.
250 251 252 253 254 255 256 257 258 |
# File 'lib/google/apis/adsense_v2/service.rb', line 250 def get_account_adclient_adcode(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}/adcode', ) command.response_representation = Google::Apis::AdsenseV2::AdClientAdCode::Representation command.response_class = Google::Apis::AdsenseV2::AdClientAdCode command.params['name'] = name unless name.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_account_adclient_adunit(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdUnit
Gets an ad unit from a specified account and ad client.
363 364 365 366 367 368 369 370 371 |
# File 'lib/google/apis/adsense_v2/service.rb', line 363 def get_account_adclient_adunit(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::AdsenseV2::AdUnit::Representation command.response_class = Google::Apis::AdsenseV2::AdUnit command.params['name'] = name unless name.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_account_adclient_adunit_adcode(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdUnitAdCode
Gets the ad unit code for a given ad unit. For more information, see About the AdSense code and Where to place the ad code in your HTML.
397 398 399 400 401 402 403 404 405 |
# File 'lib/google/apis/adsense_v2/service.rb', line 397 def get_account_adclient_adunit_adcode(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}/adcode', ) command.response_representation = Google::Apis::AdsenseV2::AdUnitAdCode::Representation command.response_class = Google::Apis::AdsenseV2::AdUnitAdCode command.params['name'] = name unless name.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_account_adclient_customchannel(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::CustomChannel
Gets information about the selected custom channel.
624 625 626 627 628 629 630 631 632 |
# File 'lib/google/apis/adsense_v2/service.rb', line 624 def get_account_adclient_customchannel(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::AdsenseV2::CustomChannel::Representation command.response_class = Google::Apis::AdsenseV2::CustomChannel command.params['name'] = name unless name.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_account_adclient_urlchannel(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::UrlChannel
Gets information about the selected url channel.
779 780 781 782 783 784 785 786 787 |
# File 'lib/google/apis/adsense_v2/service.rb', line 779 def get_account_adclient_urlchannel(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::AdsenseV2::UrlChannel::Representation command.response_class = Google::Apis::AdsenseV2::UrlChannel command.params['name'] = name unless name.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_account_policy_issue(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::PolicyIssue
Gets information about the selected policy issue.
919 920 921 922 923 924 925 926 927 |
# File 'lib/google/apis/adsense_v2/service.rb', line 919 def get_account_policy_issue(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::AdsenseV2::PolicyIssue::Representation command.response_class = Google::Apis::AdsenseV2::PolicyIssue command.params['name'] = name unless name.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_account_report_saved(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::SavedReport
Gets the saved report from the given resource name.
1189 1190 1191 1192 1193 1194 1195 1196 1197 |
# File 'lib/google/apis/adsense_v2/service.rb', line 1189 def get_account_report_saved(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}/saved', ) command.response_representation = Google::Apis::AdsenseV2::SavedReport::Representation command.response_class = Google::Apis::AdsenseV2::SavedReport command.params['name'] = name unless name.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_account_site(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::Site
Gets information about the selected site.
1407 1408 1409 1410 1411 1412 1413 1414 1415 |
# File 'lib/google/apis/adsense_v2/service.rb', line 1407 def get_account_site(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::AdsenseV2::Site::Representation command.response_class = Google::Apis::AdsenseV2::Site command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_account_adclient_adunit_linked_custom_channels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListLinkedCustomChannelsResponse
Lists all the custom channels available for an ad unit.
478 479 480 481 482 483 484 485 486 487 488 |
# File 'lib/google/apis/adsense_v2/service.rb', line 478 def list_account_adclient_adunit_linked_custom_channels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}:listLinkedCustomChannels', ) command.response_representation = Google::Apis::AdsenseV2::ListLinkedCustomChannelsResponse::Representation command.response_class = Google::Apis::AdsenseV2::ListLinkedCustomChannelsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end |
#list_account_adclient_adunits(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListAdUnitsResponse
Lists all ad units under a specified account and ad client.
436 437 438 439 440 441 442 443 444 445 446 |
# File 'lib/google/apis/adsense_v2/service.rb', line 436 def list_account_adclient_adunits(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/adunits', ) command.response_representation = Google::Apis::AdsenseV2::ListAdUnitsResponse::Representation command.response_class = Google::Apis::AdsenseV2::ListAdUnitsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end |
#list_account_adclient_customchannel_linked_ad_units(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListLinkedAdUnitsResponse
Lists all the ad units available for a custom channel.
706 707 708 709 710 711 712 713 714 715 716 |
# File 'lib/google/apis/adsense_v2/service.rb', line 706 def list_account_adclient_customchannel_linked_ad_units(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}:listLinkedAdUnits', ) command.response_representation = Google::Apis::AdsenseV2::ListLinkedAdUnitsResponse::Representation command.response_class = Google::Apis::AdsenseV2::ListLinkedAdUnitsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end |
#list_account_adclient_customchannels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListCustomChannelsResponse
Lists all the custom channels available in an ad client.
664 665 666 667 668 669 670 671 672 673 674 |
# File 'lib/google/apis/adsense_v2/service.rb', line 664 def list_account_adclient_customchannels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/customchannels', ) command.response_representation = Google::Apis::AdsenseV2::ListCustomChannelsResponse::Representation command.response_class = Google::Apis::AdsenseV2::ListCustomChannelsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end |
#list_account_adclient_urlchannels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListUrlChannelsResponse
Lists active url channels.
818 819 820 821 822 823 824 825 826 827 828 |
# File 'lib/google/apis/adsense_v2/service.rb', line 818 def list_account_adclient_urlchannels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/urlchannels', ) command.response_representation = Google::Apis::AdsenseV2::ListUrlChannelsResponse::Representation command.response_class = Google::Apis::AdsenseV2::ListUrlChannelsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end |
#list_account_adclients(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListAdClientsResponse
Lists all the ad clients available in an account.
289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/google/apis/adsense_v2/service.rb', line 289 def list_account_adclients(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/adclients', ) command.response_representation = Google::Apis::AdsenseV2::ListAdClientsResponse::Representation command.response_class = Google::Apis::AdsenseV2::ListAdClientsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end |
#list_account_alerts(parent, language_code: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListAlertsResponse
Lists all the alerts available in an account.
856 857 858 859 860 861 862 863 864 865 |
# File 'lib/google/apis/adsense_v2/service.rb', line 856 def list_account_alerts(parent, language_code: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/alerts', ) command.response_representation = Google::Apis::AdsenseV2::ListAlertsResponse::Representation command.response_class = Google::Apis::AdsenseV2::ListAlertsResponse command.params['parent'] = parent unless parent.nil? command.query['languageCode'] = language_code unless language_code.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_account_child_accounts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListChildAccountsResponse
Lists all accounts directly managed by the given AdSense account.
183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/google/apis/adsense_v2/service.rb', line 183 def list_account_child_accounts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}:listChildAccounts', ) command.response_representation = Google::Apis::AdsenseV2::ListChildAccountsResponse::Representation command.response_class = Google::Apis::AdsenseV2::ListChildAccountsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end |
#list_account_payments(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListPaymentsResponse
Lists all the payments available for an account.
888 889 890 891 892 893 894 895 896 |
# File 'lib/google/apis/adsense_v2/service.rb', line 888 def list_account_payments(parent, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/payments', ) command.response_representation = Google::Apis::AdsenseV2::ListPaymentsResponse::Representation command.response_class = Google::Apis::AdsenseV2::ListPaymentsResponse command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_account_policy_issues(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListPolicyIssuesResponse
Lists all the policy issues where the specified account is involved, both directly and through any AFP child accounts.
960 961 962 963 964 965 966 967 968 969 970 |
# File 'lib/google/apis/adsense_v2/service.rb', line 960 def list_account_policy_issues(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/policyIssues', ) command.response_representation = Google::Apis::AdsenseV2::ListPolicyIssuesResponse::Representation command.response_class = Google::Apis::AdsenseV2::ListPolicyIssuesResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end |
#list_account_report_saveds(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListSavedReportsResponse
Lists saved reports.
1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 |
# File 'lib/google/apis/adsense_v2/service.rb', line 1375 def list_account_report_saveds(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/reports/saved', ) command.response_representation = Google::Apis::AdsenseV2::ListSavedReportsResponse::Representation command.response_class = Google::Apis::AdsenseV2::ListSavedReportsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end |
#list_account_sites(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListSitesResponse
Lists all the sites available in an account.
1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 |
# File 'lib/google/apis/adsense_v2/service.rb', line 1446 def list_account_sites(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/sites', ) command.response_representation = Google::Apis::AdsenseV2::ListSitesResponse::Representation command.response_class = Google::Apis::AdsenseV2::ListSitesResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end |
#list_accounts(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::ListAccountsResponse
Lists all accounts available to this user.
142 143 144 145 146 147 148 149 150 151 |
# File 'lib/google/apis/adsense_v2/service.rb', line 142 def list_accounts(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/accounts', ) command.response_representation = Google::Apis::AdsenseV2::ListAccountsResponse::Representation command.response_class = Google::Apis::AdsenseV2::ListAccountsResponse command.query['pageSize'] = page_size unless page_size.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? execute_or_queue_command(command, &block) end |
#patch_account_adclient_adunit(name, ad_unit_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::AdUnit
Updates an ad unit. This method can be called only by a restricted set of
projects, which are usually owned by AdSense for Platforms publishers. Contact your account
manager if you need to use this method. For now, this method can only be used
to update DISPLAY
ad units. See: https://support.google.com/adsense/answer/
9183566
519 520 521 522 523 524 525 526 527 528 529 530 |
# File 'lib/google/apis/adsense_v2/service.rb', line 519 def patch_account_adclient_adunit(name, ad_unit_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/{+name}', ) command.request_representation = Google::Apis::AdsenseV2::AdUnit::Representation command.request_object = ad_unit_object command.response_representation = Google::Apis::AdsenseV2::AdUnit::Representation command.response_class = Google::Apis::AdsenseV2::AdUnit command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_account_adclient_customchannel(name, custom_channel_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseV2::CustomChannel
Updates a custom channel. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers. Contact your account manager if you need to use this method.
745 746 747 748 749 750 751 752 753 754 755 756 |
# File 'lib/google/apis/adsense_v2/service.rb', line 745 def patch_account_adclient_customchannel(name, custom_channel_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/{+name}', ) command.request_representation = Google::Apis::AdsenseV2::CustomChannel::Representation command.request_object = custom_channel_object command.response_representation = Google::Apis::AdsenseV2::CustomChannel::Representation command.response_class = Google::Apis::AdsenseV2::CustomChannel command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |