Class: Google::Apis::AdsenseplatformV1alpha::AdSensePlatformService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::AdsenseplatformV1alpha::AdSensePlatformService
- Defined in:
- lib/google/apis/adsenseplatform_v1alpha/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::AdsenseplatformV1alpha::CloseAccountResponse
Closes a sub-account.
-
#create_platform_account(parent, account_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1alpha::Account
Creates a sub-account.
-
#create_platform_account_event(parent, event_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1alpha::Event
Creates an account event.
-
#create_platform_account_site(parent, site_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1alpha::Site
Creates a site for a specified account.
-
#delete_platform_account_site(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1alpha::Empty
Deletes a site from a specified account.
-
#get_account_platform(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1alpha::Platform
Gets a platform.
-
#get_platform_account(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1alpha::Account
Gets information about the selected sub-account.
-
#get_platform_account_site(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1alpha::Site
Gets a site from a specified sub-account.
-
#initialize ⇒ AdSensePlatformService
constructor
A new instance of AdSensePlatformService.
-
#list_account_platforms(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1alpha::ListPlatformsResponse
Lists platforms for a specified account.
-
#list_platform_account_sites(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1alpha::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::AdsenseplatformV1alpha::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::AdsenseplatformV1alpha::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::AdsenseplatformV1alpha::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_v1alpha/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-adsenseplatform_v1alpha', client_version: Google::Apis::AdsenseplatformV1alpha::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_v1alpha/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_v1alpha/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::AdsenseplatformV1alpha::CloseAccountResponse
Closes a sub-account.
146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/google/apis/adsenseplatform_v1alpha/service.rb', line 146 def close_account(name, close_account_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha/{+name}:close', ) command.request_representation = Google::Apis::AdsenseplatformV1alpha::CloseAccountRequest::Representation command.request_object = close_account_request_object command.response_representation = Google::Apis::AdsenseplatformV1alpha::CloseAccountResponse::Representation command.response_class = Google::Apis::AdsenseplatformV1alpha::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::AdsenseplatformV1alpha::Account
Creates a sub-account.
179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/google/apis/adsenseplatform_v1alpha/service.rb', line 179 def create_platform_account(parent, account_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha/{+parent}/accounts', ) command.request_representation = Google::Apis::AdsenseplatformV1alpha::Account::Representation command.request_object = account_object command.response_representation = Google::Apis::AdsenseplatformV1alpha::Account::Representation command.response_class = Google::Apis::AdsenseplatformV1alpha::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::AdsenseplatformV1alpha::Event
Creates an account event.
317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/google/apis/adsenseplatform_v1alpha/service.rb', line 317 def create_platform_account_event(parent, event_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha/{+parent}/events', ) command.request_representation = Google::Apis::AdsenseplatformV1alpha::Event::Representation command.request_object = event_object command.response_representation = Google::Apis::AdsenseplatformV1alpha::Event::Representation command.response_class = Google::Apis::AdsenseplatformV1alpha::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::AdsenseplatformV1alpha::Site
Creates a site for a specified account.
351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/google/apis/adsenseplatform_v1alpha/service.rb', line 351 def create_platform_account_site(parent, site_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha/{+parent}/sites', ) command.request_representation = Google::Apis::AdsenseplatformV1alpha::Site::Representation command.request_object = site_object command.response_representation = Google::Apis::AdsenseplatformV1alpha::Site::Representation command.response_class = Google::Apis::AdsenseplatformV1alpha::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::AdsenseplatformV1alpha::Empty
Deletes a site from a specified account.
384 385 386 387 388 389 390 391 392 |
# File 'lib/google/apis/adsenseplatform_v1alpha/service.rb', line 384 def delete_platform_account_site(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1alpha/{+name}', ) command.response_representation = Google::Apis::AdsenseplatformV1alpha::Empty::Representation command.response_class = Google::Apis::AdsenseplatformV1alpha::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_account_platform(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1alpha::Platform
Gets a platform.
75 76 77 78 79 80 81 82 83 |
# File 'lib/google/apis/adsenseplatform_v1alpha/service.rb', line 75 def get_account_platform(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/{+name}', ) command.response_representation = Google::Apis::AdsenseplatformV1alpha::Platform::Representation command.response_class = Google::Apis::AdsenseplatformV1alpha::Platform 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::AdsenseplatformV1alpha::Account
Gets information about the selected sub-account.
212 213 214 215 216 217 218 219 220 |
# File 'lib/google/apis/adsenseplatform_v1alpha/service.rb', line 212 def get_platform_account(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/{+name}', ) command.response_representation = Google::Apis::AdsenseplatformV1alpha::Account::Representation command.response_class = Google::Apis::AdsenseplatformV1alpha::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::AdsenseplatformV1alpha::Site
Gets a site from a specified sub-account.
415 416 417 418 419 420 421 422 423 |
# File 'lib/google/apis/adsenseplatform_v1alpha/service.rb', line 415 def get_platform_account_site(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/{+name}', ) command.response_representation = Google::Apis::AdsenseplatformV1alpha::Site::Representation command.response_class = Google::Apis::AdsenseplatformV1alpha::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_platforms(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1alpha::ListPlatformsResponse
Lists platforms for a specified account.
113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/google/apis/adsenseplatform_v1alpha/service.rb', line 113 def list_account_platforms(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/{+parent}/platforms', ) command.response_representation = Google::Apis::AdsenseplatformV1alpha::ListPlatformsResponse::Representation command.response_class = Google::Apis::AdsenseplatformV1alpha::ListPlatformsResponse 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_account_sites(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdsenseplatformV1alpha::ListSitesResponse
Lists sites for a specific account.
454 455 456 457 458 459 460 461 462 463 464 |
# File 'lib/google/apis/adsenseplatform_v1alpha/service.rb', line 454 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, 'v1alpha/{+parent}/sites', ) command.response_representation = Google::Apis::AdsenseplatformV1alpha::ListSitesResponse::Representation command.response_class = Google::Apis::AdsenseplatformV1alpha::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::AdsenseplatformV1alpha::ListAccountsResponse
Lists a partial view of sub-accounts for a specific parent account.
249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/google/apis/adsenseplatform_v1alpha/service.rb', line 249 def list_platform_accounts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/{+parent}/accounts', ) command.response_representation = Google::Apis::AdsenseplatformV1alpha::ListAccountsResponse::Representation command.response_class = Google::Apis::AdsenseplatformV1alpha::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::AdsenseplatformV1alpha::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.
284 285 286 287 288 289 290 291 292 293 |
# File 'lib/google/apis/adsenseplatform_v1alpha/service.rb', line 284 def lookup_platform_account(parent, creation_request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/{+parent}/accounts:lookup', ) command.response_representation = Google::Apis::AdsenseplatformV1alpha::LookupAccountResponse::Representation command.response_class = Google::Apis::AdsenseplatformV1alpha::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::AdsenseplatformV1alpha::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.
490 491 492 493 494 495 496 497 498 |
# File 'lib/google/apis/adsenseplatform_v1alpha/service.rb', line 490 def request_platform_account_site_review(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha/{+name}:requestReview', ) command.response_representation = Google::Apis::AdsenseplatformV1alpha::RequestSiteReviewResponse::Representation command.response_class = Google::Apis::AdsenseplatformV1alpha::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 |