google-apis-doubleclickbidmanager_v1_1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,351 @@
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 DoubleclickbidmanagerV1_1
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_v1_1'
30
+ #
31
+ # Doubleclickbidmanager = Google::Apis::DoubleclickbidmanagerV1_1 # 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/', 'doubleclickbidmanager/v1.1/',
48
+ client_name: 'google-apis-doubleclickbidmanager_v1_1',
49
+ client_version: Google::Apis::DoubleclickbidmanagerV1_1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Retrieves line items in CSV format. YouTube & partners line items are not
54
+ # supported.
55
+ # @param [Google::Apis::DoubleclickbidmanagerV1_1::DownloadLineItemsRequest] download_line_items_request_object
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::DoubleclickbidmanagerV1_1::DownloadLineItemsResponse] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::DoubleclickbidmanagerV1_1::DownloadLineItemsResponse]
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 downloadlineitems_lineitem(download_line_items_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:post, 'lineitems/downloadlineitems', options)
75
+ command.request_representation = Google::Apis::DoubleclickbidmanagerV1_1::DownloadLineItemsRequest::Representation
76
+ command.request_object = download_line_items_request_object
77
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1_1::DownloadLineItemsResponse::Representation
78
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1_1::DownloadLineItemsResponse
79
+ command.query['fields'] = fields unless fields.nil?
80
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
81
+ execute_or_queue_command(command, &block)
82
+ end
83
+
84
+ # Uploads line items in CSV format. YouTube & partners line items are not
85
+ # supported.
86
+ # @param [Google::Apis::DoubleclickbidmanagerV1_1::UploadLineItemsRequest] upload_line_items_request_object
87
+ # @param [String] fields
88
+ # Selector specifying which fields to include in a partial response.
89
+ # @param [String] quota_user
90
+ # Available to use for quota purposes for server-side applications. Can be any
91
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
92
+ # @param [Google::Apis::RequestOptions] options
93
+ # Request-specific options
94
+ #
95
+ # @yield [result, err] Result & error if block supplied
96
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1_1::UploadLineItemsResponse] parsed result object
97
+ # @yieldparam err [StandardError] error object if request failed
98
+ #
99
+ # @return [Google::Apis::DoubleclickbidmanagerV1_1::UploadLineItemsResponse]
100
+ #
101
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
102
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
103
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
104
+ def uploadlineitems_lineitem(upload_line_items_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
105
+ command = make_simple_command(:post, 'lineitems/uploadlineitems', options)
106
+ command.request_representation = Google::Apis::DoubleclickbidmanagerV1_1::UploadLineItemsRequest::Representation
107
+ command.request_object = upload_line_items_request_object
108
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1_1::UploadLineItemsResponse::Representation
109
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1_1::UploadLineItemsResponse
110
+ command.query['fields'] = fields unless fields.nil?
111
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
112
+ execute_or_queue_command(command, &block)
113
+ end
114
+
115
+ # Creates a query.
116
+ # @param [Google::Apis::DoubleclickbidmanagerV1_1::Query] query_object
117
+ # @param [Boolean] asynchronous
118
+ # If true, tries to run the query asynchronously. Only applicable when the
119
+ # frequency is ONE_TIME.
120
+ # @param [String] fields
121
+ # Selector specifying which fields to include in a partial response.
122
+ # @param [String] quota_user
123
+ # Available to use for quota purposes for server-side applications. Can be any
124
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
125
+ # @param [Google::Apis::RequestOptions] options
126
+ # Request-specific options
127
+ #
128
+ # @yield [result, err] Result & error if block supplied
129
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1_1::Query] parsed result object
130
+ # @yieldparam err [StandardError] error object if request failed
131
+ #
132
+ # @return [Google::Apis::DoubleclickbidmanagerV1_1::Query]
133
+ #
134
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
135
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
136
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
137
+ def createquery_query(query_object = nil, asynchronous: nil, fields: nil, quota_user: nil, options: nil, &block)
138
+ command = make_simple_command(:post, 'query', options)
139
+ command.request_representation = Google::Apis::DoubleclickbidmanagerV1_1::Query::Representation
140
+ command.request_object = query_object
141
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1_1::Query::Representation
142
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1_1::Query
143
+ command.query['asynchronous'] = asynchronous unless asynchronous.nil?
144
+ command.query['fields'] = fields unless fields.nil?
145
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
146
+ execute_or_queue_command(command, &block)
147
+ end
148
+
149
+ # Deletes a stored query as well as the associated stored reports.
150
+ # @param [Fixnum] query_id
151
+ # Query ID to delete.
152
+ # @param [String] fields
153
+ # Selector specifying which fields to include in a partial response.
154
+ # @param [String] quota_user
155
+ # Available to use for quota purposes for server-side applications. Can be any
156
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
157
+ # @param [Google::Apis::RequestOptions] options
158
+ # Request-specific options
159
+ #
160
+ # @yield [result, err] Result & error if block supplied
161
+ # @yieldparam result [NilClass] No result returned for this method
162
+ # @yieldparam err [StandardError] error object if request failed
163
+ #
164
+ # @return [void]
165
+ #
166
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
167
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
168
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
169
+ def deletequery_query(query_id, fields: nil, quota_user: nil, options: nil, &block)
170
+ command = make_simple_command(:delete, 'query/{queryId}', options)
171
+ command.params['queryId'] = query_id unless query_id.nil?
172
+ command.query['fields'] = fields unless fields.nil?
173
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
174
+ execute_or_queue_command(command, &block)
175
+ end
176
+
177
+ # Retrieves a stored query.
178
+ # @param [Fixnum] query_id
179
+ # Query ID to retrieve.
180
+ # @param [String] fields
181
+ # Selector specifying which fields to include in a partial response.
182
+ # @param [String] quota_user
183
+ # Available to use for quota purposes for server-side applications. Can be any
184
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
185
+ # @param [Google::Apis::RequestOptions] options
186
+ # Request-specific options
187
+ #
188
+ # @yield [result, err] Result & error if block supplied
189
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1_1::Query] parsed result object
190
+ # @yieldparam err [StandardError] error object if request failed
191
+ #
192
+ # @return [Google::Apis::DoubleclickbidmanagerV1_1::Query]
193
+ #
194
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
195
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
196
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
197
+ def getquery_query(query_id, fields: nil, quota_user: nil, options: nil, &block)
198
+ command = make_simple_command(:get, 'query/{queryId}', options)
199
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1_1::Query::Representation
200
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1_1::Query
201
+ command.params['queryId'] = query_id unless query_id.nil?
202
+ command.query['fields'] = fields unless fields.nil?
203
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
204
+ execute_or_queue_command(command, &block)
205
+ end
206
+
207
+ # Retrieves stored queries.
208
+ # @param [Fixnum] page_size
209
+ # Maximum number of results per page. Must be between 1 and 100. Defaults to 100
210
+ # if unspecified.
211
+ # @param [String] page_token
212
+ # Optional pagination token.
213
+ # @param [String] fields
214
+ # Selector specifying which fields to include in a partial response.
215
+ # @param [String] quota_user
216
+ # Available to use for quota purposes for server-side applications. Can be any
217
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
218
+ # @param [Google::Apis::RequestOptions] options
219
+ # Request-specific options
220
+ #
221
+ # @yield [result, err] Result & error if block supplied
222
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1_1::ListQueriesResponse] parsed result object
223
+ # @yieldparam err [StandardError] error object if request failed
224
+ #
225
+ # @return [Google::Apis::DoubleclickbidmanagerV1_1::ListQueriesResponse]
226
+ #
227
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
228
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
229
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
230
+ def listqueries_query(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
231
+ command = make_simple_command(:get, 'queries', options)
232
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1_1::ListQueriesResponse::Representation
233
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1_1::ListQueriesResponse
234
+ command.query['pageSize'] = page_size unless page_size.nil?
235
+ command.query['pageToken'] = page_token unless page_token.nil?
236
+ command.query['fields'] = fields unless fields.nil?
237
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
238
+ execute_or_queue_command(command, &block)
239
+ end
240
+
241
+ # Runs a stored query to generate a report.
242
+ # @param [Fixnum] query_id
243
+ # Query ID to run.
244
+ # @param [Google::Apis::DoubleclickbidmanagerV1_1::RunQueryRequest] run_query_request_object
245
+ # @param [Boolean] asynchronous
246
+ # If true, tries to run the query asynchronously.
247
+ # @param [String] fields
248
+ # Selector specifying which fields to include in a partial response.
249
+ # @param [String] quota_user
250
+ # Available to use for quota purposes for server-side applications. Can be any
251
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
252
+ # @param [Google::Apis::RequestOptions] options
253
+ # Request-specific options
254
+ #
255
+ # @yield [result, err] Result & error if block supplied
256
+ # @yieldparam result [NilClass] No result returned for this method
257
+ # @yieldparam err [StandardError] error object if request failed
258
+ #
259
+ # @return [void]
260
+ #
261
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
262
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
263
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
264
+ def runquery_query(query_id, run_query_request_object = nil, asynchronous: nil, fields: nil, quota_user: nil, options: nil, &block)
265
+ command = make_simple_command(:post, 'query/{queryId}', options)
266
+ command.request_representation = Google::Apis::DoubleclickbidmanagerV1_1::RunQueryRequest::Representation
267
+ command.request_object = run_query_request_object
268
+ command.params['queryId'] = query_id unless query_id.nil?
269
+ command.query['asynchronous'] = asynchronous unless asynchronous.nil?
270
+ command.query['fields'] = fields unless fields.nil?
271
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
272
+ execute_or_queue_command(command, &block)
273
+ end
274
+
275
+ # Retrieves stored reports.
276
+ # @param [Fixnum] query_id
277
+ # Query ID with which the reports are associated.
278
+ # @param [Fixnum] page_size
279
+ # Maximum number of results per page. Must be between 1 and 100. Defaults to 100
280
+ # if unspecified.
281
+ # @param [String] page_token
282
+ # Optional pagination token.
283
+ # @param [String] fields
284
+ # Selector specifying which fields to include in a partial response.
285
+ # @param [String] quota_user
286
+ # Available to use for quota purposes for server-side applications. Can be any
287
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
288
+ # @param [Google::Apis::RequestOptions] options
289
+ # Request-specific options
290
+ #
291
+ # @yield [result, err] Result & error if block supplied
292
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1_1::ListReportsResponse] parsed result object
293
+ # @yieldparam err [StandardError] error object if request failed
294
+ #
295
+ # @return [Google::Apis::DoubleclickbidmanagerV1_1::ListReportsResponse]
296
+ #
297
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
298
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
299
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
300
+ def listreports_report(query_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
301
+ command = make_simple_command(:get, 'queries/{queryId}/reports', options)
302
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1_1::ListReportsResponse::Representation
303
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1_1::ListReportsResponse
304
+ command.params['queryId'] = query_id unless query_id.nil?
305
+ command.query['pageSize'] = page_size unless page_size.nil?
306
+ command.query['pageToken'] = page_token unless page_token.nil?
307
+ command.query['fields'] = fields unless fields.nil?
308
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
309
+ execute_or_queue_command(command, &block)
310
+ end
311
+
312
+ # Retrieves entities in SDF format.
313
+ # @param [Google::Apis::DoubleclickbidmanagerV1_1::DownloadRequest] download_request_object
314
+ # @param [String] fields
315
+ # Selector specifying which fields to include in a partial response.
316
+ # @param [String] quota_user
317
+ # Available to use for quota purposes for server-side applications. Can be any
318
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
319
+ # @param [Google::Apis::RequestOptions] options
320
+ # Request-specific options
321
+ #
322
+ # @yield [result, err] Result & error if block supplied
323
+ # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1_1::DownloadResponse] parsed result object
324
+ # @yieldparam err [StandardError] error object if request failed
325
+ #
326
+ # @return [Google::Apis::DoubleclickbidmanagerV1_1::DownloadResponse]
327
+ #
328
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
329
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
330
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
331
+ def download_sdf(download_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
332
+ command = make_simple_command(:post, 'sdf/download', options)
333
+ command.request_representation = Google::Apis::DoubleclickbidmanagerV1_1::DownloadRequest::Representation
334
+ command.request_object = download_request_object
335
+ command.response_representation = Google::Apis::DoubleclickbidmanagerV1_1::DownloadResponse::Representation
336
+ command.response_class = Google::Apis::DoubleclickbidmanagerV1_1::DownloadResponse
337
+ command.query['fields'] = fields unless fields.nil?
338
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
339
+ execute_or_queue_command(command, &block)
340
+ end
341
+
342
+ protected
343
+
344
+ def apply_command_defaults(command)
345
+ command.query['key'] = key unless key.nil?
346
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
347
+ end
348
+ end
349
+ end
350
+ end
351
+ end
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-apis-doubleclickbidmanager_v1_1
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: 2021-01-08 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.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.1'
27
+ description: This is the simple REST client for DoubleClick Bid Manager API V1_1.
28
+ Simple REST clients are Ruby client libraries that provide access to Google services
29
+ via their HTTP REST API endpoints. These libraries are generated and updated automatically
30
+ based on the discovery documents published by the service, and they handle most
31
+ concerns such as authentication, pagination, retry, timeouts, and logging. You can
32
+ use this client to access the DoubleClick Bid Manager API, but note that some services
33
+ may provide a separate modern client that is easier to use.
34
+ email: googleapis-packages@google.com
35
+ executables: []
36
+ extensions: []
37
+ extra_rdoc_files: []
38
+ files:
39
+ - ".yardopts"
40
+ - CHANGELOG.md
41
+ - LICENSE.md
42
+ - OVERVIEW.md
43
+ - lib/google-apis-doubleclickbidmanager_v1_1.rb
44
+ - lib/google/apis/doubleclickbidmanager_v1_1.rb
45
+ - lib/google/apis/doubleclickbidmanager_v1_1/classes.rb
46
+ - lib/google/apis/doubleclickbidmanager_v1_1/gem_version.rb
47
+ - lib/google/apis/doubleclickbidmanager_v1_1/representations.rb
48
+ - lib/google/apis/doubleclickbidmanager_v1_1/service.rb
49
+ homepage: https://github.com/google/google-api-ruby-client
50
+ licenses:
51
+ - Apache-2.0
52
+ metadata:
53
+ bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
+ changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-doubleclickbidmanager_v1_1/CHANGELOG.md
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-doubleclickbidmanager_v1_1/v0.1.0
56
+ source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-doubleclickbidmanager_v1_1
57
+ post_install_message:
58
+ rdoc_options: []
59
+ require_paths:
60
+ - lib
61
+ required_ruby_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '2.4'
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ requirements: []
72
+ rubygems_version: 3.1.4
73
+ signing_key:
74
+ specification_version: 4
75
+ summary: Simple REST client for DoubleClick Bid Manager API V1_1
76
+ test_files: []