Class: Google::Apis::Searchads360V0::SA360Service

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/searchads360_v0/service.rb

Overview

Search Ads 360 Reporting API

The Search Ads 360 API allows developers to automate downloading reports from Search Ads 360.

Examples:

require 'google/apis/searchads360_v0'

Searchads360 = Google::Apis::Searchads360V0 # Alias the module
service = Searchads360::SA360Service.new

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSA360Service

Returns a new instance of SA360Service.



46
47
48
49
50
51
# File 'lib/google/apis/searchads360_v0/service.rb', line 46

def initialize
  super('https://searchads360.googleapis.com/', '',
        client_name: 'google-apis-searchads360_v0',
        client_version: Google::Apis::Searchads360V0::GEM_VERSION)
  @batch_path = 'batch'
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 'lib/google/apis/searchads360_v0/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.

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.



44
45
46
# File 'lib/google/apis/searchads360_v0/service.rb', line 44

def quota_user
  @quota_user
end

Instance Method Details

#get_customer_custom_column(resource_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesCustomColumn

Returns the requested custom column in full detail.

Parameters:

  • resource_name (String)

    Required. The resource name of the custom column to fetch.

  • 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.

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

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



73
74
75
76
77
78
79
80
81
# File 'lib/google/apis/searchads360_v0/service.rb', line 73

def get_customer_custom_column(resource_name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v0/{+resourceName}', options)
  command.response_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesCustomColumn::Representation
  command.response_class = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesCustomColumn
  command.params['resourceName'] = resource_name unless resource_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_search_ads360_field(resource_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesSearchAds360Field

Returns just the requested field. List of thrown errors: AuthenticationError AuthorizationError HeaderError InternalError QuotaError RequestError

Parameters:

  • resource_name (String)

    Required. The resource name of the field 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.

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

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



205
206
207
208
209
210
211
212
213
# File 'lib/google/apis/searchads360_v0/service.rb', line 205

def get_search_ads360_field(resource_name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v0/{+resourceName}', options)
  command.response_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesSearchAds360Field::Representation
  command.response_class = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesSearchAds360Field
  command.params['resourceName'] = resource_name unless resource_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_customer_custom_columns(customer_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesListCustomColumnsResponse

Returns all the custom columns associated with the customer in full detail.

Parameters:

  • customer_id (String)

    Required. The ID of the customer to apply the CustomColumn list operation to.

  • 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.

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

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



103
104
105
106
107
108
109
110
111
# File 'lib/google/apis/searchads360_v0/service.rb', line 103

def list_customer_custom_columns(customer_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v0/customers/{+customerId}/customColumns', options)
  command.response_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesListCustomColumnsResponse::Representation
  command.response_class = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesListCustomColumnsResponse
  command.params['customerId'] = customer_id unless customer_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

#search_customer_search_ads360_stream(customer_id, google_ads_searchads360_v0_services__search_search_ads360_stream_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360StreamResponse

Returns all rows that match the search stream query. List of thrown errors: AuthenticationError AuthorizationError HeaderError InternalError QueryError QuotaError RequestError

Parameters:

  • customer_id (String)

    Required. The ID of the customer being queried.

  • google_ads_searchads360_v0_services__search_search_ads360_stream_request_object (Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360StreamRequest) (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.

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

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



171
172
173
174
175
176
177
178
179
180
181
# File 'lib/google/apis/searchads360_v0/service.rb', line 171

def search_customer_search_ads360_stream(customer_id, google_ads_searchads360_v0_services__search_search_ads360_stream_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v0/customers/{+customerId}/searchAds360:searchStream', options)
  command.request_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360StreamRequest::Representation
  command.request_object = google_ads_searchads360_v0_services__search_search_ads360_stream_request_object
  command.response_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360StreamResponse::Representation
  command.response_class = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360StreamResponse
  command.params['customerId'] = customer_id unless customer_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

#search_customer_search_ads360s(customer_id, google_ads_searchads360_v0_services__search_search_ads360_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360Response

Returns all rows that match the search query. List of thrown errors: AuthenticationError AuthorizationError HeaderError InternalError QueryError QuotaError RequestError

Parameters:

  • customer_id (String)

    Required. The ID of the customer being queried.

  • google_ads_searchads360_v0_services__search_search_ads360_request_object (Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360Request) (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.

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

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



136
137
138
139
140
141
142
143
144
145
146
# File 'lib/google/apis/searchads360_v0/service.rb', line 136

def search_customer_search_ads360s(customer_id, google_ads_searchads360_v0_services__search_search_ads360_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v0/customers/{+customerId}/searchAds360:search', options)
  command.request_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360Request::Representation
  command.request_object = google_ads_searchads360_v0_services__search_search_ads360_request_object
  command.response_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360Response::Representation
  command.response_class = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360Response
  command.params['customerId'] = customer_id unless customer_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

#search_search_ads360_fields(google_ads_searchads360_v0_services__search_search_ads360_fields_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360FieldsResponse

Returns all fields that match the search query. List of thrown errors: AuthenticationError AuthorizationError HeaderError InternalError QueryError QuotaError RequestError

Parameters:

  • google_ads_searchads360_v0_services__search_search_ads360_fields_request_object (Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360FieldsRequest) (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.

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

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



236
237
238
239
240
241
242
243
244
245
# File 'lib/google/apis/searchads360_v0/service.rb', line 236

def search_search_ads360_fields(google_ads_searchads360_v0_services__search_search_ads360_fields_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v0/searchAds360Fields:search', options)
  command.request_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360FieldsRequest::Representation
  command.request_object = google_ads_searchads360_v0_services__search_search_ads360_fields_request_object
  command.response_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360FieldsResponse::Representation
  command.response_class = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360FieldsResponse
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end