google-apis-searchads360_v0 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,256 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module Searchads360V0
23
+ # Search Ads 360 Reporting API
24
+ #
25
+ # The Search Ads 360 API allows developers to automate downloading reports from
26
+ # Search Ads 360.
27
+ #
28
+ # @example
29
+ # require 'google/apis/searchads360_v0'
30
+ #
31
+ # Searchads360 = Google::Apis::Searchads360V0 # Alias the module
32
+ # service = Searchads360::SA360Service.new
33
+ #
34
+ # @see https://developers.google.com/search-ads/reporting
35
+ class SA360Service < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://searchads360.googleapis.com/', '',
48
+ client_name: 'google-apis-searchads360_v0',
49
+ client_version: Google::Apis::Searchads360V0::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Returns the requested custom column in full detail.
54
+ # @param [String] resource_name
55
+ # Required. The resource name of the custom column to fetch.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesCustomColumn] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesCustomColumn]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_customer_custom_column(resource_name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v0/{+resourceName}', options)
75
+ command.response_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesCustomColumn::Representation
76
+ command.response_class = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesCustomColumn
77
+ command.params['resourceName'] = resource_name unless resource_name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Returns all the custom columns associated with the customer in full detail.
84
+ # @param [String] customer_id
85
+ # Required. The ID of the customer to apply the CustomColumn list operation to.
86
+ # @param [String] fields
87
+ # Selector specifying which fields to include in a partial response.
88
+ # @param [String] quota_user
89
+ # Available to use for quota purposes for server-side applications. Can be any
90
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
91
+ # @param [Google::Apis::RequestOptions] options
92
+ # Request-specific options
93
+ #
94
+ # @yield [result, err] Result & error if block supplied
95
+ # @yieldparam result [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesListCustomColumnsResponse] parsed result object
96
+ # @yieldparam err [StandardError] error object if request failed
97
+ #
98
+ # @return [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesListCustomColumnsResponse]
99
+ #
100
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
101
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
102
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
103
+ def list_customer_custom_columns(customer_id, fields: nil, quota_user: nil, options: nil, &block)
104
+ command = make_simple_command(:get, 'v0/customers/{+customerId}/customColumns', options)
105
+ command.response_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesListCustomColumnsResponse::Representation
106
+ command.response_class = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesListCustomColumnsResponse
107
+ command.params['customerId'] = customer_id unless customer_id.nil?
108
+ command.query['fields'] = fields unless fields.nil?
109
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
110
+ execute_or_queue_command(command, &block)
111
+ end
112
+
113
+ # Returns all rows that match the search query. List of thrown errors: [
114
+ # AuthenticationError]() [AuthorizationError]() [HeaderError]() [InternalError]()
115
+ # [QueryError]() [QuotaError]() [RequestError]()
116
+ # @param [String] customer_id
117
+ # Required. The ID of the customer being queried.
118
+ # @param [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360Request] google_ads_searchads360_v0_services__search_search_ads360_request_object
119
+ # @param [String] fields
120
+ # Selector specifying which fields to include in a partial response.
121
+ # @param [String] quota_user
122
+ # Available to use for quota purposes for server-side applications. Can be any
123
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
124
+ # @param [Google::Apis::RequestOptions] options
125
+ # Request-specific options
126
+ #
127
+ # @yield [result, err] Result & error if block supplied
128
+ # @yieldparam result [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360Response] parsed result object
129
+ # @yieldparam err [StandardError] error object if request failed
130
+ #
131
+ # @return [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360Response]
132
+ #
133
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
134
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
135
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
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)
137
+ command = make_simple_command(:post, 'v0/customers/{+customerId}/searchAds360:search', options)
138
+ command.request_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360Request::Representation
139
+ command.request_object = google_ads_searchads360_v0_services__search_search_ads360_request_object
140
+ command.response_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360Response::Representation
141
+ command.response_class = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360Response
142
+ command.params['customerId'] = customer_id unless customer_id.nil?
143
+ command.query['fields'] = fields unless fields.nil?
144
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
145
+ execute_or_queue_command(command, &block)
146
+ end
147
+
148
+ # Returns all rows that match the search stream query. List of thrown errors: [
149
+ # AuthenticationError]() [AuthorizationError]() [HeaderError]() [InternalError]()
150
+ # [QueryError]() [QuotaError]() [RequestError]()
151
+ # @param [String] customer_id
152
+ # Required. The ID of the customer being queried.
153
+ # @param [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360StreamRequest] google_ads_searchads360_v0_services__search_search_ads360_stream_request_object
154
+ # @param [String] fields
155
+ # Selector specifying which fields to include in a partial response.
156
+ # @param [String] quota_user
157
+ # Available to use for quota purposes for server-side applications. Can be any
158
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
159
+ # @param [Google::Apis::RequestOptions] options
160
+ # Request-specific options
161
+ #
162
+ # @yield [result, err] Result & error if block supplied
163
+ # @yieldparam result [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360StreamResponse] parsed result object
164
+ # @yieldparam err [StandardError] error object if request failed
165
+ #
166
+ # @return [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360StreamResponse]
167
+ #
168
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
169
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
170
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
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)
172
+ command = make_simple_command(:post, 'v0/customers/{+customerId}/searchAds360:searchStream', options)
173
+ command.request_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360StreamRequest::Representation
174
+ command.request_object = google_ads_searchads360_v0_services__search_search_ads360_stream_request_object
175
+ command.response_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360StreamResponse::Representation
176
+ command.response_class = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360StreamResponse
177
+ command.params['customerId'] = customer_id unless customer_id.nil?
178
+ command.query['fields'] = fields unless fields.nil?
179
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
180
+ execute_or_queue_command(command, &block)
181
+ end
182
+
183
+ # Returns just the requested field. List of thrown errors: [AuthenticationError](
184
+ # ) [AuthorizationError]() [HeaderError]() [InternalError]() [QuotaError]() [
185
+ # RequestError]()
186
+ # @param [String] resource_name
187
+ # Required. The resource name of the field to get.
188
+ # @param [String] fields
189
+ # Selector specifying which fields to include in a partial response.
190
+ # @param [String] quota_user
191
+ # Available to use for quota purposes for server-side applications. Can be any
192
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
193
+ # @param [Google::Apis::RequestOptions] options
194
+ # Request-specific options
195
+ #
196
+ # @yield [result, err] Result & error if block supplied
197
+ # @yieldparam result [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesSearchAds360Field] parsed result object
198
+ # @yieldparam err [StandardError] error object if request failed
199
+ #
200
+ # @return [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesSearchAds360Field]
201
+ #
202
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
203
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
204
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
205
+ def get_search_ads360_field(resource_name, fields: nil, quota_user: nil, options: nil, &block)
206
+ command = make_simple_command(:get, 'v0/{+resourceName}', options)
207
+ command.response_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesSearchAds360Field::Representation
208
+ command.response_class = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ResourcesSearchAds360Field
209
+ command.params['resourceName'] = resource_name unless resource_name.nil?
210
+ command.query['fields'] = fields unless fields.nil?
211
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
212
+ execute_or_queue_command(command, &block)
213
+ end
214
+
215
+ # Returns all fields that match the search query. List of thrown errors: [
216
+ # AuthenticationError]() [AuthorizationError]() [HeaderError]() [InternalError]()
217
+ # [QueryError]() [QuotaError]() [RequestError]()
218
+ # @param [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360FieldsRequest] google_ads_searchads360_v0_services__search_search_ads360_fields_request_object
219
+ # @param [String] fields
220
+ # Selector specifying which fields to include in a partial response.
221
+ # @param [String] quota_user
222
+ # Available to use for quota purposes for server-side applications. Can be any
223
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
224
+ # @param [Google::Apis::RequestOptions] options
225
+ # Request-specific options
226
+ #
227
+ # @yield [result, err] Result & error if block supplied
228
+ # @yieldparam result [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360FieldsResponse] parsed result object
229
+ # @yieldparam err [StandardError] error object if request failed
230
+ #
231
+ # @return [Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360FieldsResponse]
232
+ #
233
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
234
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
235
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
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)
237
+ command = make_simple_command(:post, 'v0/searchAds360Fields:search', options)
238
+ command.request_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360FieldsRequest::Representation
239
+ command.request_object = google_ads_searchads360_v0_services__search_search_ads360_fields_request_object
240
+ command.response_representation = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360FieldsResponse::Representation
241
+ command.response_class = Google::Apis::Searchads360V0::GoogleAdsSearchads360V0ServicesSearchSearchAds360FieldsResponse
242
+ command.query['fields'] = fields unless fields.nil?
243
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
244
+ execute_or_queue_command(command, &block)
245
+ end
246
+
247
+ protected
248
+
249
+ def apply_command_defaults(command)
250
+ command.query['key'] = key unless key.nil?
251
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
252
+ end
253
+ end
254
+ end
255
+ end
256
+ end
@@ -0,0 +1,37 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/searchads360_v0/service.rb'
16
+ require 'google/apis/searchads360_v0/classes.rb'
17
+ require 'google/apis/searchads360_v0/representations.rb'
18
+ require 'google/apis/searchads360_v0/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Search Ads 360 Reporting API
23
+ #
24
+ # The Search Ads 360 API allows developers to automate downloading reports from
25
+ # Search Ads 360.
26
+ #
27
+ # @see https://developers.google.com/search-ads/reporting
28
+ module Searchads360V0
29
+ # Version of the Search Ads 360 Reporting API this client connects to.
30
+ # This is NOT the gem version.
31
+ VERSION = 'V0'
32
+
33
+ # View and manage your advertising data in DoubleClick Search
34
+ AUTH_DOUBLECLICKSEARCH = 'https://www.googleapis.com/auth/doubleclicksearch'
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "google/apis/searchads360_v0"
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-apis-searchads360_v0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Google LLC
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-01-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: google-apis-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.9.1
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 2.a
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 0.9.1
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 2.a
33
+ description: This is the simple REST client for Search Ads 360 Reporting API V0. Simple
34
+ REST clients are Ruby client libraries that provide access to Google services via
35
+ their HTTP REST API endpoints. These libraries are generated and updated automatically
36
+ based on the discovery documents published by the service, and they handle most
37
+ concerns such as authentication, pagination, retry, timeouts, and logging. You can
38
+ use this client to access the Search Ads 360 Reporting API, but note that some services
39
+ may provide a separate modern client that is easier to use.
40
+ email: googleapis-packages@google.com
41
+ executables: []
42
+ extensions: []
43
+ extra_rdoc_files: []
44
+ files:
45
+ - ".yardopts"
46
+ - CHANGELOG.md
47
+ - LICENSE.md
48
+ - OVERVIEW.md
49
+ - lib/google-apis-searchads360_v0.rb
50
+ - lib/google/apis/searchads360_v0.rb
51
+ - lib/google/apis/searchads360_v0/classes.rb
52
+ - lib/google/apis/searchads360_v0/gem_version.rb
53
+ - lib/google/apis/searchads360_v0/representations.rb
54
+ - lib/google/apis/searchads360_v0/service.rb
55
+ homepage: https://github.com/google/google-api-ruby-client
56
+ licenses:
57
+ - Apache-2.0
58
+ metadata:
59
+ bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
+ changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-searchads360_v0/CHANGELOG.md
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-searchads360_v0/v0.1.0
62
+ source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-searchads360_v0
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '2.5'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubygems_version: 3.4.2
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Simple REST client for Search Ads 360 Reporting API V0
82
+ test_files: []