Class: Google::Apis::AdsenseplatformV1::AdSensePlatformService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::AdsenseplatformV1::AdSensePlatformService
- Defined in:
- lib/google/apis/adsenseplatform_v1/service.rb
Overview
AdSense Platform API
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://adsenseplatform.$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
-
#close_account(name, close_account_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::CloseAccountResponse
Closes a sub-account.
-
#create_platform_account(parent, account_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::Account
Creates a sub-account.
-
#create_platform_account_event(parent, event_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::Event
Creates an account event.
-
#create_platform_account_site(parent, site_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::Site
Creates a site for a specified account.
-
#delete_platform_account_site(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::Empty
Deletes a site from a specified account.
-
#get_platform_account(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::Account
Gets information about the selected sub-account.
-
#get_platform_account_site(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::Site
Gets a site from a specified sub-account.
-
#initialize ⇒ AdSensePlatformService
constructor
A new instance of AdSensePlatformService.
-
#list_platform_account_sites(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::ListSitesResponse
Lists sites for a specific account.
-
#list_platform_accounts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::ListAccountsResponse
Lists a partial view of sub-accounts for a specific parent account.
-
#lookup_platform_account(parent, creation_request_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::LookupAccountResponse
Looks up information about a sub-account for a specified creation_request_id.
-
#request_platform_account_site_review(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::RequestSiteReviewResponse
Requests the review of a site.
Constructor Details
#initialize ⇒ AdSensePlatformService
Returns a new instance of AdSensePlatformService.
47 48 49 50 51 52 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-adsenseplatform_v1', client_version: Google::Apis::AdsenseplatformV1::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.
40 41 42 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 40 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.
45 46 47 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#close_account(name, close_account_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::CloseAccountResponse
Closes a sub-account.
75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 75 def close_account(name, close_account_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:close', ) command.request_representation = Google::Apis::AdsenseplatformV1::CloseAccountRequest::Representation command.request_object = close_account_request_object command.response_representation = Google::Apis::AdsenseplatformV1::CloseAccountResponse::Representation command.response_class = Google::Apis::AdsenseplatformV1::CloseAccountResponse 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 |
#create_platform_account(parent, account_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::Account
Creates a sub-account.
108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 108 def create_platform_account(parent, account_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/accounts', ) command.request_representation = Google::Apis::AdsenseplatformV1::Account::Representation command.request_object = account_object command.response_representation = Google::Apis::AdsenseplatformV1::Account::Representation command.response_class = Google::Apis::AdsenseplatformV1::Account 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_platform_account_event(parent, event_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::Event
Creates an account event.
246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 246 def create_platform_account_event(parent, event_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/events', ) command.request_representation = Google::Apis::AdsenseplatformV1::Event::Representation command.request_object = event_object command.response_representation = Google::Apis::AdsenseplatformV1::Event::Representation command.response_class = Google::Apis::AdsenseplatformV1::Event 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_platform_account_site(parent, site_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::Site
Creates a site for a specified account.
280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 280 def create_platform_account_site(parent, site_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/sites', ) command.request_representation = Google::Apis::AdsenseplatformV1::Site::Representation command.request_object = site_object command.response_representation = Google::Apis::AdsenseplatformV1::Site::Representation command.response_class = Google::Apis::AdsenseplatformV1::Site 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_platform_account_site(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::Empty
Deletes a site from a specified account.
313 314 315 316 317 318 319 320 321 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 313 def delete_platform_account_site(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::AdsenseplatformV1::Empty::Representation command.response_class = Google::Apis::AdsenseplatformV1::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 |
#get_platform_account(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::Account
Gets information about the selected sub-account.
141 142 143 144 145 146 147 148 149 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 141 def get_platform_account(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::AdsenseplatformV1::Account::Representation command.response_class = Google::Apis::AdsenseplatformV1::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_platform_account_site(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::Site
Gets a site from a specified sub-account.
344 345 346 347 348 349 350 351 352 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 344 def get_platform_account_site(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::AdsenseplatformV1::Site::Representation command.response_class = Google::Apis::AdsenseplatformV1::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_platform_account_sites(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::ListSitesResponse
Lists sites for a specific account.
383 384 385 386 387 388 389 390 391 392 393 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 383 def list_platform_account_sites(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/sites', ) command.response_representation = Google::Apis::AdsenseplatformV1::ListSitesResponse::Representation command.response_class = Google::Apis::AdsenseplatformV1::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_platform_accounts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::ListAccountsResponse
Lists a partial view of sub-accounts for a specific parent account.
178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 178 def list_platform_accounts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/accounts', ) command.response_representation = Google::Apis::AdsenseplatformV1::ListAccountsResponse::Representation command.response_class = Google::Apis::AdsenseplatformV1::ListAccountsResponse 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 |
#lookup_platform_account(parent, creation_request_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::LookupAccountResponse
Looks up information about a sub-account for a specified creation_request_id. If no account exists for the given creation_request_id, returns 404.
213 214 215 216 217 218 219 220 221 222 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 213 def lookup_platform_account(parent, creation_request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/accounts:lookup', ) command.response_representation = Google::Apis::AdsenseplatformV1::LookupAccountResponse::Representation command.response_class = Google::Apis::AdsenseplatformV1::LookupAccountResponse command.params['parent'] = parent unless parent.nil? command.query['creationRequestId'] = creation_request_id unless creation_request_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#request_platform_account_site_review(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1::RequestSiteReviewResponse
Requests the review of a site. The site should be in REQUIRES_REVIEW or NEEDS_ATTENTION state. Note: Make sure you place an ad tag on your site before requesting a review.
419 420 421 422 423 424 425 426 427 |
# File 'lib/google/apis/adsenseplatform_v1/service.rb', line 419 def request_platform_account_site_review(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:requestReview', ) command.response_representation = Google::Apis::AdsenseplatformV1::RequestSiteReviewResponse::Representation command.response_class = Google::Apis::AdsenseplatformV1::RequestSiteReviewResponse 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 |