google-apis-doubleclickbidmanager_v2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,306 @@
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 DoubleclickbidmanagerV2
23
+ # DoubleClick Bid Manager API
24
+ #
25
+ # DoubleClick Bid Manager API allows users to manage and create campaigns and
26
+ # reports.
27
+ #
28
+ # @example
29
+ # require 'google/apis/doubleclickbidmanager_v2'
30
+ #
31
+ # Doubleclickbidmanager = Google::Apis::DoubleclickbidmanagerV2 # Alias the module
32
+ # service = Doubleclickbidmanager::DoubleClickBidManagerService.new
33
+ #
34
+ # @see https://developers.google.com/bid-manager/
35
+ class DoubleClickBidManagerService < 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://doubleclickbidmanager.googleapis.com/', 'v2/',
48
+ client_name: 'google-apis-doubleclickbidmanager_v2',
49
+ client_version: Google::Apis::DoubleclickbidmanagerV2::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Creates a query.
54
+ # @param [Google::Apis::DoubleclickbidmanagerV2::Query] query_object
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV2::Query] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::DoubleclickbidmanagerV2::Query]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def create_query(query_object = nil, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:post, 'queries', options)
74
+ command.request_representation = Google::Apis::DoubleclickbidmanagerV2::Query::Representation
75
+ command.request_object = query_object
76
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV2::Query::Representation
77
+ command.response_class = Google::Apis::DoubleclickbidmanagerV2::Query
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
+ # Deletes a stored query as well as the associated stored reports.
84
+ # @param [Fixnum] query_id
85
+ # Required. Query ID to delete.
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 [NilClass] No result returned for this method
96
+ # @yieldparam err [StandardError] error object if request failed
97
+ #
98
+ # @return [void]
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 delete_query(query_id, fields: nil, quota_user: nil, options: nil, &block)
104
+ command = make_simple_command(:delete, 'queries/{queryId}', options)
105
+ command.params['queryId'] = query_id unless query_id.nil?
106
+ command.query['fields'] = fields unless fields.nil?
107
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
108
+ execute_or_queue_command(command, &block)
109
+ end
110
+
111
+ # Retrieves a stored query.
112
+ # @param [Fixnum] query_id
113
+ # Required. Query ID to retrieve.
114
+ # @param [String] fields
115
+ # Selector specifying which fields to include in a partial response.
116
+ # @param [String] quota_user
117
+ # Available to use for quota purposes for server-side applications. Can be any
118
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
119
+ # @param [Google::Apis::RequestOptions] options
120
+ # Request-specific options
121
+ #
122
+ # @yield [result, err] Result & error if block supplied
123
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV2::Query] parsed result object
124
+ # @yieldparam err [StandardError] error object if request failed
125
+ #
126
+ # @return [Google::Apis::DoubleclickbidmanagerV2::Query]
127
+ #
128
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
129
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
130
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
131
+ def get_query(query_id, fields: nil, quota_user: nil, options: nil, &block)
132
+ command = make_simple_command(:get, 'queries/{queryId}', options)
133
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV2::Query::Representation
134
+ command.response_class = Google::Apis::DoubleclickbidmanagerV2::Query
135
+ command.params['queryId'] = query_id unless query_id.nil?
136
+ command.query['fields'] = fields unless fields.nil?
137
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
138
+ execute_or_queue_command(command, &block)
139
+ end
140
+
141
+ # Retrieves stored queries.
142
+ # @param [String] order_by
143
+ # Name of a field used to order results. The default sorting order is ascending.
144
+ # To specify descending order for a field, append a " desc" suffix. For example "
145
+ # metadata.title desc". Sorting is only supported for the following fields: *
146
+ # queryId * metadata.title
147
+ # @param [Fixnum] page_size
148
+ # Maximum number of results per page. Must be between `1` and `100`. Defaults to
149
+ # `100` if unspecified.
150
+ # @param [String] page_token
151
+ # A page token, received from a previous list call. Provide this to retrieve the
152
+ # subsequent page of queries.
153
+ # @param [String] fields
154
+ # Selector specifying which fields to include in a partial response.
155
+ # @param [String] quota_user
156
+ # Available to use for quota purposes for server-side applications. Can be any
157
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
158
+ # @param [Google::Apis::RequestOptions] options
159
+ # Request-specific options
160
+ #
161
+ # @yield [result, err] Result & error if block supplied
162
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV2::ListQueriesResponse] parsed result object
163
+ # @yieldparam err [StandardError] error object if request failed
164
+ #
165
+ # @return [Google::Apis::DoubleclickbidmanagerV2::ListQueriesResponse]
166
+ #
167
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
168
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
169
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
170
+ def list_queries(order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
171
+ command = make_simple_command(:get, 'queries', options)
172
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV2::ListQueriesResponse::Representation
173
+ command.response_class = Google::Apis::DoubleclickbidmanagerV2::ListQueriesResponse
174
+ command.query['orderBy'] = order_by unless order_by.nil?
175
+ command.query['pageSize'] = page_size unless page_size.nil?
176
+ command.query['pageToken'] = page_token unless page_token.nil?
177
+ command.query['fields'] = fields unless fields.nil?
178
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
179
+ execute_or_queue_command(command, &block)
180
+ end
181
+
182
+ # Runs a stored query to generate a report.
183
+ # @param [Fixnum] query_id
184
+ # Required. Query ID to run.
185
+ # @param [Google::Apis::DoubleclickbidmanagerV2::RunQueryRequest] run_query_request_object
186
+ # @param [Boolean] synchronous
187
+ # Whether the query should be run synchronously. When true, this method will not
188
+ # return until the query has finished running. When false or not specified, this
189
+ # method will return immediately.
190
+ # @param [String] fields
191
+ # Selector specifying which fields to include in a partial response.
192
+ # @param [String] quota_user
193
+ # Available to use for quota purposes for server-side applications. Can be any
194
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
195
+ # @param [Google::Apis::RequestOptions] options
196
+ # Request-specific options
197
+ #
198
+ # @yield [result, err] Result & error if block supplied
199
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV2::Report] parsed result object
200
+ # @yieldparam err [StandardError] error object if request failed
201
+ #
202
+ # @return [Google::Apis::DoubleclickbidmanagerV2::Report]
203
+ #
204
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
205
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
206
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
207
+ def run_query(query_id, run_query_request_object = nil, synchronous: nil, fields: nil, quota_user: nil, options: nil, &block)
208
+ command = make_simple_command(:post, 'queries/{queryId}:run', options)
209
+ command.request_representation = Google::Apis::DoubleclickbidmanagerV2::RunQueryRequest::Representation
210
+ command.request_object = run_query_request_object
211
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV2::Report::Representation
212
+ command.response_class = Google::Apis::DoubleclickbidmanagerV2::Report
213
+ command.params['queryId'] = query_id unless query_id.nil?
214
+ command.query['synchronous'] = synchronous unless synchronous.nil?
215
+ command.query['fields'] = fields unless fields.nil?
216
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
217
+ execute_or_queue_command(command, &block)
218
+ end
219
+
220
+ # Retrieves a stored report.
221
+ # @param [Fixnum] query_id
222
+ # Required. ID of the query the report is associated with.
223
+ # @param [Fixnum] report_id
224
+ # Required. ID of the report to retrieve.
225
+ # @param [String] fields
226
+ # Selector specifying which fields to include in a partial response.
227
+ # @param [String] quota_user
228
+ # Available to use for quota purposes for server-side applications. Can be any
229
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
230
+ # @param [Google::Apis::RequestOptions] options
231
+ # Request-specific options
232
+ #
233
+ # @yield [result, err] Result & error if block supplied
234
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV2::Report] parsed result object
235
+ # @yieldparam err [StandardError] error object if request failed
236
+ #
237
+ # @return [Google::Apis::DoubleclickbidmanagerV2::Report]
238
+ #
239
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
240
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
241
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
242
+ def get_query_report(query_id, report_id, fields: nil, quota_user: nil, options: nil, &block)
243
+ command = make_simple_command(:get, 'queries/{queryId}/reports/{reportId}', options)
244
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV2::Report::Representation
245
+ command.response_class = Google::Apis::DoubleclickbidmanagerV2::Report
246
+ command.params['queryId'] = query_id unless query_id.nil?
247
+ command.params['reportId'] = report_id unless report_id.nil?
248
+ command.query['fields'] = fields unless fields.nil?
249
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
250
+ execute_or_queue_command(command, &block)
251
+ end
252
+
253
+ # Lists reports.
254
+ # @param [Fixnum] query_id
255
+ # Required. Query ID with which the reports are associated.
256
+ # @param [String] order_by
257
+ # Name of a field used to order results. The default sorting order is ascending.
258
+ # To specify descending order for a field, append a " desc" suffix. For example "
259
+ # key.reportId desc". Sorting is only supported for the following fields: * key.
260
+ # reportId
261
+ # @param [Fixnum] page_size
262
+ # Maximum number of results per page. Must be between `1` and `100`. Defaults to
263
+ # `100` if unspecified.
264
+ # @param [String] page_token
265
+ # A page token, received from a previous list call. Provide this to retrieve the
266
+ # subsequent page of reports.
267
+ # @param [String] fields
268
+ # Selector specifying which fields to include in a partial response.
269
+ # @param [String] quota_user
270
+ # Available to use for quota purposes for server-side applications. Can be any
271
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
272
+ # @param [Google::Apis::RequestOptions] options
273
+ # Request-specific options
274
+ #
275
+ # @yield [result, err] Result & error if block supplied
276
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV2::ListReportsResponse] parsed result object
277
+ # @yieldparam err [StandardError] error object if request failed
278
+ #
279
+ # @return [Google::Apis::DoubleclickbidmanagerV2::ListReportsResponse]
280
+ #
281
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
282
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
283
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
284
+ def list_query_reports(query_id, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
285
+ command = make_simple_command(:get, 'queries/{queryId}/reports', options)
286
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV2::ListReportsResponse::Representation
287
+ command.response_class = Google::Apis::DoubleclickbidmanagerV2::ListReportsResponse
288
+ command.params['queryId'] = query_id unless query_id.nil?
289
+ command.query['orderBy'] = order_by unless order_by.nil?
290
+ command.query['pageSize'] = page_size unless page_size.nil?
291
+ command.query['pageToken'] = page_token unless page_token.nil?
292
+ command.query['fields'] = fields unless fields.nil?
293
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
294
+ execute_or_queue_command(command, &block)
295
+ end
296
+
297
+ protected
298
+
299
+ def apply_command_defaults(command)
300
+ command.query['key'] = key unless key.nil?
301
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
302
+ end
303
+ end
304
+ end
305
+ end
306
+ 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/doubleclickbidmanager_v2/service.rb'
16
+ require 'google/apis/doubleclickbidmanager_v2/classes.rb'
17
+ require 'google/apis/doubleclickbidmanager_v2/representations.rb'
18
+ require 'google/apis/doubleclickbidmanager_v2/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # DoubleClick Bid Manager API
23
+ #
24
+ # DoubleClick Bid Manager API allows users to manage and create campaigns and
25
+ # reports.
26
+ #
27
+ # @see https://developers.google.com/bid-manager/
28
+ module DoubleclickbidmanagerV2
29
+ # Version of the DoubleClick Bid Manager API this client connects to.
30
+ # This is NOT the gem version.
31
+ VERSION = 'V2'
32
+
33
+ # View and manage your reports in DoubleClick Bid Manager
34
+ AUTH_DOUBLECLICKBIDMANAGER = 'https://www.googleapis.com/auth/doubleclickbidmanager'
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/doubleclickbidmanager_v2"
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-apis-doubleclickbidmanager_v2
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: 2022-06-13 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.5'
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.5'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 2.a
33
+ description: This is the simple REST client for DoubleClick Bid Manager API V2. 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 DoubleClick Bid Manager 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-doubleclickbidmanager_v2.rb
50
+ - lib/google/apis/doubleclickbidmanager_v2.rb
51
+ - lib/google/apis/doubleclickbidmanager_v2/classes.rb
52
+ - lib/google/apis/doubleclickbidmanager_v2/gem_version.rb
53
+ - lib/google/apis/doubleclickbidmanager_v2/representations.rb
54
+ - lib/google/apis/doubleclickbidmanager_v2/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-doubleclickbidmanager_v2/CHANGELOG.md
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-doubleclickbidmanager_v2/v0.1.0
62
+ source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-doubleclickbidmanager_v2
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.3.14
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Simple REST client for DoubleClick Bid Manager API V2
82
+ test_files: []