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

Constructor Details

#initializeAdSenseHostService

Returns a new instance of AdSenseHostService.


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

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

Instance Attribute Details

#keyString

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

Returns:

  • (String)

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


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

def key
  @key
end

#quota_userString

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. Overrides userIp if both are provided.

Returns:

  • (String)

    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. Overrides userIp if both are provided.


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

def quota_user
  @quota_user
end

#user_ipString

Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Returns:

  • (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.


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

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.

Parameters:

  • account_id (String)

    Account which contains the ad unit.

  • ad_client_id (String)

    Ad client for which to get ad unit.

  • ad_unit_id (String)

    Ad unit to delete.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


236
237
238
239
240
241
242
243
244
245
246
247
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 236

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.

Parameters:

  • ad_client_id (String)

    Ad client from which to delete the custom channel.

  • custom_channel_id (String)

    Custom channel to delete.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


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

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.

Parameters:

  • ad_client_id (String)

    Ad client from which to delete the URL channel.

  • url_channel_id (String)

    URL channel to delete.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 1061

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.

Parameters:

  • account_id (String)

    Hosted account upon which to report.

  • start_date (String)

    Start of the date range to report on in "YYYY-MM-DD" format, inclusive.

  • end_date (String)

    End of the date range to report on in "YYYY-MM-DD" format, inclusive.

  • dimension (Array<String>, String) (defaults to: nil)

    Dimensions to base the report on.

  • filter (Array<String>, String) (defaults to: nil)

    Filters to be run on the report.

  • locale (String) (defaults to: nil)

    Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.

  • max_results (Fixnum) (defaults to: nil)

    The maximum number of rows of report data to return.

  • metric (Array<String>, String) (defaults to: nil)

    Numeric columns to include in the report.

  • sort (Array<String>, String) (defaults to: nil)

    The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.

  • start_index (Fixnum) (defaults to: nil)

    Index of the first row of report data to return.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 557

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.

Parameters:

  • start_date (String)

    Start of the date range to report on in "YYYY-MM-DD" format, inclusive.

  • end_date (String)

    End of the date range to report on in "YYYY-MM-DD" format, inclusive.

  • dimension (Array<String>, String) (defaults to: nil)

    Dimensions to base the report on.

  • filter (Array<String>, String) (defaults to: nil)

    Filters to be run on the report.

  • locale (String) (defaults to: nil)

    Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.

  • max_results (Fixnum) (defaults to: nil)

    The maximum number of rows of report data to return.

  • metric (Array<String>, String) (defaults to: nil)

    Numeric columns to include in the report.

  • sort (Array<String>, String) (defaults to: nil)

    The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.

  • start_index (Fixnum) (defaults to: nil)

    Index of the first row of report data to return.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 1016

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.

Parameters:

  • account_id (String)

    Account to get information about.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


80
81
82
83
84
85
86
87
88
89
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 80

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::Account::Representation
  command.response_class = Google::Apis::AdsensehostV4_1::Account
  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.

Parameters:

  • account_id (String)

    Account which contains the ad client.

  • ad_client_id (String)

    Ad client to get.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


153
154
155
156
157
158
159
160
161
162
163
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 153

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.

Parameters:

  • account_id (String)

    Account which contains the ad unit.

  • ad_client_id (String)

    Ad client for which to get ad unit.

  • ad_unit_id (String)

    Ad unit to get.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


277
278
279
280
281
282
283
284
285
286
287
288
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 277

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.

Parameters:

  • account_id (String)

    Account which contains the ad client.

  • ad_client_id (String)

    Ad client with contains the ad unit.

  • ad_unit_id (String)

    Ad unit to get the code for.

  • host_custom_channel_id (Array<String>, String) (defaults to: nil)

    Host custom channel to attach to the ad code.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 321

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.

Parameters:

  • ad_client_id (String)

    Ad client to get.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


601
602
603
604
605
606
607
608
609
610
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 601

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.

Parameters:

  • ad_client_id (String)

    Ad client from which to get the custom channel.

  • custom_channel_id (String)

    Custom channel to get.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


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

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.

Parameters:

  • account_id (String)

    Account which will contain the ad unit.

  • ad_client_id (String)

    Ad client into which to insert the ad unit.

  • ad_unit_object (Google::Apis::AdsensehostV4_1::AdUnit) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


362
363
364
365
366
367
368
369
370
371
372
373
374
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 362

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.

Parameters:

  • ad_client_id (String)

    Ad client to which the new custom channel will be added.

  • custom_channel_object (Google::Apis::AdsensehostV4_1::CustomChannel) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


834
835
836
837
838
839
840
841
842
843
844
845
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 834

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.

Parameters:

  • ad_client_id (String)

    Ad client to which the new URL channel will be added.

  • url_channel_object (Google::Apis::AdsensehostV4_1::UrlChannel) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 1098

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.

Parameters:

  • account_id (String)

    Account for which to list ad clients.

  • max_results (Fixnum) (defaults to: nil)

    The maximum number of ad clients to include in the response, used for paging.

  • page_token (String) (defaults to: nil)

    A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


195
196
197
198
199
200
201
202
203
204
205
206
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 195

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.

Parameters:

  • account_id (String)

    Account which contains the ad client.

  • ad_client_id (String)

    Ad client for which to list ad units.

  • include_inactive (Boolean) (defaults to: nil)

    Whether to include inactive ad units. Default: true.

  • max_results (Fixnum) (defaults to: nil)

    The maximum number of ad units to include in the response, used for paging.

  • page_token (String) (defaults to: nil)

    A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 409

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.

Parameters:

  • filter_ad_client_id (Array<String>, String)

    Ad clients to list accounts for.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


115
116
117
118
119
120
121
122
123
124
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 115

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.

Parameters:

  • max_results (Fixnum) (defaults to: nil)

    The maximum number of ad clients to include in the response, used for paging.

  • page_token (String) (defaults to: nil)

    A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


640
641
642
643
644
645
646
647
648
649
650
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 640

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.

Parameters:

  • ad_client_id (String)

    Ad client for which to list custom channels.

  • max_results (Fixnum) (defaults to: nil)

    The maximum number of custom channels to include in the response, used for paging.

  • page_token (String) (defaults to: nil)

    A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


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

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.

Parameters:

  • ad_client_id (String)

    Ad client for which to list URL channels.

  • max_results (Fixnum) (defaults to: nil)

    The maximum number of URL channels to include in the response, used for paging.

  • page_token (String) (defaults to: nil)

    A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 1141

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.

Parameters:

  • account_id (String)

    Account which contains the ad client.

  • ad_client_id (String)

    Ad client which contains the ad unit.

  • ad_unit_id (String)

    Ad unit to get.

  • ad_unit_object (Google::Apis::AdsensehostV4_1::AdUnit) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


454
455
456
457
458
459
460
461
462
463
464
465
466
467
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 454

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.

Parameters:

  • ad_client_id (String)

    Ad client in which the custom channel will be updated.

  • custom_channel_id (String)

    Custom channel to get.

  • custom_channel_object (Google::Apis::AdsensehostV4_1::CustomChannel) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


919
920
921
922
923
924
925
926
927
928
929
930
931
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 919

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.

Parameters:

  • product_code (Array<String>, String)

    Products to associate with the user.

  • website_url (String)

    The URL of the user's hosted website.

  • user_locale (String) (defaults to: nil)

    The preferred locale of the user.

  • website_locale (String) (defaults to: nil)

    The locale of the user's hosted website.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


683
684
685
686
687
688
689
690
691
692
693
694
695
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 683

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.

Parameters:

  • account_id (String)

    Account which contains the ad client.

  • ad_client_id (String)

    Ad client which contains the ad unit.

  • ad_unit_object (Google::Apis::AdsensehostV4_1::AdUnit) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


496
497
498
499
500
501
502
503
504
505
506
507
508
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 496

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.

Parameters:

  • ad_client_id (String)

    Ad client in which the custom channel will be updated.

  • custom_channel_object (Google::Apis::AdsensehostV4_1::CustomChannel) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


958
959
960
961
962
963
964
965
966
967
968
969
# File 'generated/google/apis/adsensehost_v4_1/service.rb', line 958

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.

Parameters:

  • token (String)

    The token returned to the association callback URL.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


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

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