google-apis-adsense_v1_4 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-adsense_v1_4.rb +15 -0
- data/lib/google/apis/adsense_v1_4.rb +39 -0
- data/lib/google/apis/adsense_v1_4/classes.rb +1292 -0
- data/lib/google/apis/adsense_v1_4/gem_version.rb +28 -0
- data/lib/google/apis/adsense_v1_4/representations.rb +557 -0
- data/lib/google/apis/adsense_v1_4/service.rb +1677 -0
- metadata +76 -0
@@ -0,0 +1,1677 @@
|
|
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 AdsenseV1_4
|
23
|
+
# AdSense Management API
|
24
|
+
#
|
25
|
+
# Accesses AdSense publishers' inventory and generates performance reports.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/adsense_v1_4'
|
29
|
+
#
|
30
|
+
# Adsense = Google::Apis::AdsenseV1_4 # Alias the module
|
31
|
+
# service = Adsense::AdSenseService.new
|
32
|
+
#
|
33
|
+
# @see https://developers.google.com/adsense/management/
|
34
|
+
class AdSenseService < Google::Apis::Core::BaseService
|
35
|
+
# @return [String]
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
+
attr_accessor :key
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
42
|
+
# characters.
|
43
|
+
attr_accessor :quota_user
|
44
|
+
|
45
|
+
# @return [String]
|
46
|
+
# Deprecated. Please use quotaUser instead.
|
47
|
+
attr_accessor :user_ip
|
48
|
+
|
49
|
+
def initialize
|
50
|
+
super('https://www.googleapis.com/', 'adsense/v1.4/',
|
51
|
+
client_name: 'google-apis-adsense_v1_4',
|
52
|
+
client_version: Google::Apis::AdsenseV1_4::GEM_VERSION)
|
53
|
+
@batch_path = 'batch/adsense/v1.4'
|
54
|
+
end
|
55
|
+
|
56
|
+
# Get information about the selected AdSense account.
|
57
|
+
# @param [String] account_id
|
58
|
+
# Account to get information about.
|
59
|
+
# @param [Boolean] tree
|
60
|
+
# Whether the tree of sub accounts should be returned.
|
61
|
+
# @param [String] fields
|
62
|
+
# Selector specifying which fields to include in a partial response.
|
63
|
+
# @param [String] quota_user
|
64
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
65
|
+
# characters.
|
66
|
+
# @param [String] user_ip
|
67
|
+
# Deprecated. Please use quotaUser instead.
|
68
|
+
# @param [Google::Apis::RequestOptions] options
|
69
|
+
# Request-specific options
|
70
|
+
#
|
71
|
+
# @yield [result, err] Result & error if block supplied
|
72
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Account] parsed result object
|
73
|
+
# @yieldparam err [StandardError] error object if request failed
|
74
|
+
#
|
75
|
+
# @return [Google::Apis::AdsenseV1_4::Account]
|
76
|
+
#
|
77
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
78
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
79
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
80
|
+
def get_account(account_id, tree: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
81
|
+
command = make_simple_command(:get, 'accounts/{accountId}', options)
|
82
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Account::Representation
|
83
|
+
command.response_class = Google::Apis::AdsenseV1_4::Account
|
84
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
85
|
+
command.query['tree'] = tree unless tree.nil?
|
86
|
+
command.query['fields'] = fields unless fields.nil?
|
87
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
88
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
89
|
+
execute_or_queue_command(command, &block)
|
90
|
+
end
|
91
|
+
|
92
|
+
# List all accounts available to this AdSense account.
|
93
|
+
# @param [Fixnum] max_results
|
94
|
+
# The maximum number of accounts to include in the response, used for paging.
|
95
|
+
# @param [String] page_token
|
96
|
+
# A continuation token, used to page through accounts. To retrieve the next page,
|
97
|
+
# set this parameter to the value of "nextPageToken" from the previous response.
|
98
|
+
# @param [String] fields
|
99
|
+
# Selector specifying which fields to include in a partial response.
|
100
|
+
# @param [String] quota_user
|
101
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
102
|
+
# characters.
|
103
|
+
# @param [String] user_ip
|
104
|
+
# Deprecated. Please use quotaUser instead.
|
105
|
+
# @param [Google::Apis::RequestOptions] options
|
106
|
+
# Request-specific options
|
107
|
+
#
|
108
|
+
# @yield [result, err] Result & error if block supplied
|
109
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Accounts] parsed result object
|
110
|
+
# @yieldparam err [StandardError] error object if request failed
|
111
|
+
#
|
112
|
+
# @return [Google::Apis::AdsenseV1_4::Accounts]
|
113
|
+
#
|
114
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
115
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
116
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
117
|
+
def list_accounts(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
118
|
+
command = make_simple_command(:get, 'accounts', options)
|
119
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Accounts::Representation
|
120
|
+
command.response_class = Google::Apis::AdsenseV1_4::Accounts
|
121
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
122
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
123
|
+
command.query['fields'] = fields unless fields.nil?
|
124
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
125
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
126
|
+
execute_or_queue_command(command, &block)
|
127
|
+
end
|
128
|
+
|
129
|
+
# Get Auto ad code for a given ad client.
|
130
|
+
# @param [String] account_id
|
131
|
+
# Account which contains the ad client.
|
132
|
+
# @param [String] ad_client_id
|
133
|
+
# Ad client to get the code for.
|
134
|
+
# @param [String] tag_partner
|
135
|
+
# Tag partner to include in the ad code snippet.
|
136
|
+
# @param [String] fields
|
137
|
+
# Selector specifying which fields to include in a partial response.
|
138
|
+
# @param [String] quota_user
|
139
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
140
|
+
# characters.
|
141
|
+
# @param [String] user_ip
|
142
|
+
# Deprecated. Please use quotaUser instead.
|
143
|
+
# @param [Google::Apis::RequestOptions] options
|
144
|
+
# Request-specific options
|
145
|
+
#
|
146
|
+
# @yield [result, err] Result & error if block supplied
|
147
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdCode] parsed result object
|
148
|
+
# @yieldparam err [StandardError] error object if request failed
|
149
|
+
#
|
150
|
+
# @return [Google::Apis::AdsenseV1_4::AdCode]
|
151
|
+
#
|
152
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
153
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
154
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
155
|
+
def get_account_adclient_ad_code(account_id, ad_client_id, tag_partner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
156
|
+
command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adcode', options)
|
157
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdCode::Representation
|
158
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdCode
|
159
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
160
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
161
|
+
command.query['tagPartner'] = tag_partner unless tag_partner.nil?
|
162
|
+
command.query['fields'] = fields unless fields.nil?
|
163
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
164
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
165
|
+
execute_or_queue_command(command, &block)
|
166
|
+
end
|
167
|
+
|
168
|
+
# List all ad clients in the specified account.
|
169
|
+
# @param [String] account_id
|
170
|
+
# Account for which to list ad clients.
|
171
|
+
# @param [Fixnum] max_results
|
172
|
+
# The maximum number of ad clients to include in the response, used for paging.
|
173
|
+
# @param [String] page_token
|
174
|
+
# A continuation token, used to page through ad clients. To retrieve the next
|
175
|
+
# page, set this parameter to the value of "nextPageToken" from the previous
|
176
|
+
# response.
|
177
|
+
# @param [String] fields
|
178
|
+
# Selector specifying which fields to include in a partial response.
|
179
|
+
# @param [String] quota_user
|
180
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
181
|
+
# characters.
|
182
|
+
# @param [String] user_ip
|
183
|
+
# Deprecated. Please use quotaUser instead.
|
184
|
+
# @param [Google::Apis::RequestOptions] options
|
185
|
+
# Request-specific options
|
186
|
+
#
|
187
|
+
# @yield [result, err] Result & error if block supplied
|
188
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdClients] parsed result object
|
189
|
+
# @yieldparam err [StandardError] error object if request failed
|
190
|
+
#
|
191
|
+
# @return [Google::Apis::AdsenseV1_4::AdClients]
|
192
|
+
#
|
193
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
194
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
195
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
196
|
+
def list_account_ad_clients(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
197
|
+
command = make_simple_command(:get, 'accounts/{accountId}/adclients', options)
|
198
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdClients::Representation
|
199
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdClients
|
200
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
201
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
202
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
203
|
+
command.query['fields'] = fields unless fields.nil?
|
204
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
205
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
206
|
+
execute_or_queue_command(command, &block)
|
207
|
+
end
|
208
|
+
|
209
|
+
# Gets the specified ad unit in the specified ad client for the specified
|
210
|
+
# account.
|
211
|
+
# @param [String] account_id
|
212
|
+
# Account to which the ad client belongs.
|
213
|
+
# @param [String] ad_client_id
|
214
|
+
# Ad client for which to get the ad unit.
|
215
|
+
# @param [String] ad_unit_id
|
216
|
+
# Ad unit to retrieve.
|
217
|
+
# @param [String] fields
|
218
|
+
# Selector specifying which fields to include in a partial response.
|
219
|
+
# @param [String] quota_user
|
220
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
221
|
+
# characters.
|
222
|
+
# @param [String] user_ip
|
223
|
+
# Deprecated. Please use quotaUser instead.
|
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::AdsenseV1_4::AdUnit] parsed result object
|
229
|
+
# @yieldparam err [StandardError] error object if request failed
|
230
|
+
#
|
231
|
+
# @return [Google::Apis::AdsenseV1_4::AdUnit]
|
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 get_account_ad_unit(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
237
|
+
command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}', options)
|
238
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdUnit::Representation
|
239
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdUnit
|
240
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
241
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
242
|
+
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
243
|
+
command.query['fields'] = fields unless fields.nil?
|
244
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
245
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
246
|
+
execute_or_queue_command(command, &block)
|
247
|
+
end
|
248
|
+
|
249
|
+
# Get ad code for the specified ad unit.
|
250
|
+
# @param [String] account_id
|
251
|
+
# Account which contains the ad client.
|
252
|
+
# @param [String] ad_client_id
|
253
|
+
# Ad client with contains the ad unit.
|
254
|
+
# @param [String] ad_unit_id
|
255
|
+
# Ad unit to get the code for.
|
256
|
+
# @param [String] fields
|
257
|
+
# Selector specifying which fields to include in a partial response.
|
258
|
+
# @param [String] quota_user
|
259
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
260
|
+
# characters.
|
261
|
+
# @param [String] user_ip
|
262
|
+
# Deprecated. Please use quotaUser instead.
|
263
|
+
# @param [Google::Apis::RequestOptions] options
|
264
|
+
# Request-specific options
|
265
|
+
#
|
266
|
+
# @yield [result, err] Result & error if block supplied
|
267
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdCode] parsed result object
|
268
|
+
# @yieldparam err [StandardError] error object if request failed
|
269
|
+
#
|
270
|
+
# @return [Google::Apis::AdsenseV1_4::AdCode]
|
271
|
+
#
|
272
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
273
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
274
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
275
|
+
def get_account_ad_unit_ad_code(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
276
|
+
command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode', options)
|
277
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdCode::Representation
|
278
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdCode
|
279
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
280
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
281
|
+
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
282
|
+
command.query['fields'] = fields unless fields.nil?
|
283
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
284
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
285
|
+
execute_or_queue_command(command, &block)
|
286
|
+
end
|
287
|
+
|
288
|
+
# List all ad units in the specified ad client for the specified account.
|
289
|
+
# @param [String] account_id
|
290
|
+
# Account to which the ad client belongs.
|
291
|
+
# @param [String] ad_client_id
|
292
|
+
# Ad client for which to list ad units.
|
293
|
+
# @param [Boolean] include_inactive
|
294
|
+
# Whether to include inactive ad units. Default: true.
|
295
|
+
# @param [Fixnum] max_results
|
296
|
+
# The maximum number of ad units to include in the response, used for paging.
|
297
|
+
# @param [String] page_token
|
298
|
+
# A continuation token, used to page through ad units. To retrieve the next page,
|
299
|
+
# set this parameter to the value of "nextPageToken" from the previous response.
|
300
|
+
# @param [String] fields
|
301
|
+
# Selector specifying which fields to include in a partial response.
|
302
|
+
# @param [String] quota_user
|
303
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
304
|
+
# characters.
|
305
|
+
# @param [String] user_ip
|
306
|
+
# Deprecated. Please use quotaUser instead.
|
307
|
+
# @param [Google::Apis::RequestOptions] options
|
308
|
+
# Request-specific options
|
309
|
+
#
|
310
|
+
# @yield [result, err] Result & error if block supplied
|
311
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object
|
312
|
+
# @yieldparam err [StandardError] error object if request failed
|
313
|
+
#
|
314
|
+
# @return [Google::Apis::AdsenseV1_4::AdUnits]
|
315
|
+
#
|
316
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
317
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
318
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
319
|
+
def list_account_ad_units(account_id, ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
320
|
+
command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits', options)
|
321
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation
|
322
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdUnits
|
323
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
324
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
325
|
+
command.query['includeInactive'] = include_inactive unless include_inactive.nil?
|
326
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
327
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
328
|
+
command.query['fields'] = fields unless fields.nil?
|
329
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
330
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
331
|
+
execute_or_queue_command(command, &block)
|
332
|
+
end
|
333
|
+
|
334
|
+
# List all custom channels which the specified ad unit belongs to.
|
335
|
+
# @param [String] account_id
|
336
|
+
# Account to which the ad client belongs.
|
337
|
+
# @param [String] ad_client_id
|
338
|
+
# Ad client which contains the ad unit.
|
339
|
+
# @param [String] ad_unit_id
|
340
|
+
# Ad unit for which to list custom channels.
|
341
|
+
# @param [Fixnum] max_results
|
342
|
+
# The maximum number of custom channels to include in the response, used for
|
343
|
+
# paging.
|
344
|
+
# @param [String] page_token
|
345
|
+
# A continuation token, used to page through custom channels. To retrieve the
|
346
|
+
# next page, set this parameter to the value of "nextPageToken" from the
|
347
|
+
# previous response.
|
348
|
+
# @param [String] fields
|
349
|
+
# Selector specifying which fields to include in a partial response.
|
350
|
+
# @param [String] quota_user
|
351
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
352
|
+
# characters.
|
353
|
+
# @param [String] user_ip
|
354
|
+
# Deprecated. Please use quotaUser instead.
|
355
|
+
# @param [Google::Apis::RequestOptions] options
|
356
|
+
# Request-specific options
|
357
|
+
#
|
358
|
+
# @yield [result, err] Result & error if block supplied
|
359
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object
|
360
|
+
# @yieldparam err [StandardError] error object if request failed
|
361
|
+
#
|
362
|
+
# @return [Google::Apis::AdsenseV1_4::CustomChannels]
|
363
|
+
#
|
364
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
365
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
366
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
367
|
+
def list_account_ad_unit_custom_channels(account_id, ad_client_id, ad_unit_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
368
|
+
command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/customchannels', options)
|
369
|
+
command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation
|
370
|
+
command.response_class = Google::Apis::AdsenseV1_4::CustomChannels
|
371
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
372
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
373
|
+
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
374
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
375
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
376
|
+
command.query['fields'] = fields unless fields.nil?
|
377
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
378
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
379
|
+
execute_or_queue_command(command, &block)
|
380
|
+
end
|
381
|
+
|
382
|
+
# Dismiss (delete) the specified alert from the specified publisher AdSense
|
383
|
+
# account.
|
384
|
+
# @param [String] account_id
|
385
|
+
# Account which contains the ad unit.
|
386
|
+
# @param [String] alert_id
|
387
|
+
# Alert to delete.
|
388
|
+
# @param [String] fields
|
389
|
+
# Selector specifying which fields to include in a partial response.
|
390
|
+
# @param [String] quota_user
|
391
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
392
|
+
# characters.
|
393
|
+
# @param [String] user_ip
|
394
|
+
# Deprecated. Please use quotaUser instead.
|
395
|
+
# @param [Google::Apis::RequestOptions] options
|
396
|
+
# Request-specific options
|
397
|
+
#
|
398
|
+
# @yield [result, err] Result & error if block supplied
|
399
|
+
# @yieldparam result [NilClass] No result returned for this method
|
400
|
+
# @yieldparam err [StandardError] error object if request failed
|
401
|
+
#
|
402
|
+
# @return [void]
|
403
|
+
#
|
404
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
405
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
406
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
407
|
+
def delete_account_alert(account_id, alert_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
408
|
+
command = make_simple_command(:delete, 'accounts/{accountId}/alerts/{alertId}', options)
|
409
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
410
|
+
command.params['alertId'] = alert_id unless alert_id.nil?
|
411
|
+
command.query['fields'] = fields unless fields.nil?
|
412
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
413
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
414
|
+
execute_or_queue_command(command, &block)
|
415
|
+
end
|
416
|
+
|
417
|
+
# List the alerts for the specified AdSense account.
|
418
|
+
# @param [String] account_id
|
419
|
+
# Account for which to retrieve the alerts.
|
420
|
+
# @param [String] locale
|
421
|
+
# The locale to use for translating alert messages. The account locale will be
|
422
|
+
# used if this is not supplied. The AdSense default (English) will be used if
|
423
|
+
# the supplied locale is invalid or unsupported.
|
424
|
+
# @param [String] fields
|
425
|
+
# Selector specifying which fields to include in a partial response.
|
426
|
+
# @param [String] quota_user
|
427
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
428
|
+
# characters.
|
429
|
+
# @param [String] user_ip
|
430
|
+
# Deprecated. Please use quotaUser instead.
|
431
|
+
# @param [Google::Apis::RequestOptions] options
|
432
|
+
# Request-specific options
|
433
|
+
#
|
434
|
+
# @yield [result, err] Result & error if block supplied
|
435
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Alerts] parsed result object
|
436
|
+
# @yieldparam err [StandardError] error object if request failed
|
437
|
+
#
|
438
|
+
# @return [Google::Apis::AdsenseV1_4::Alerts]
|
439
|
+
#
|
440
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
441
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
442
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
443
|
+
def list_account_alerts(account_id, locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
444
|
+
command = make_simple_command(:get, 'accounts/{accountId}/alerts', options)
|
445
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Alerts::Representation
|
446
|
+
command.response_class = Google::Apis::AdsenseV1_4::Alerts
|
447
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
448
|
+
command.query['locale'] = locale unless locale.nil?
|
449
|
+
command.query['fields'] = fields unless fields.nil?
|
450
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
451
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
452
|
+
execute_or_queue_command(command, &block)
|
453
|
+
end
|
454
|
+
|
455
|
+
# Get the specified custom channel from the specified ad client for the
|
456
|
+
# specified account.
|
457
|
+
# @param [String] account_id
|
458
|
+
# Account to which the ad client belongs.
|
459
|
+
# @param [String] ad_client_id
|
460
|
+
# Ad client which contains the custom channel.
|
461
|
+
# @param [String] custom_channel_id
|
462
|
+
# Custom channel to retrieve.
|
463
|
+
# @param [String] fields
|
464
|
+
# Selector specifying which fields to include in a partial response.
|
465
|
+
# @param [String] quota_user
|
466
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
467
|
+
# characters.
|
468
|
+
# @param [String] user_ip
|
469
|
+
# Deprecated. Please use quotaUser instead.
|
470
|
+
# @param [Google::Apis::RequestOptions] options
|
471
|
+
# Request-specific options
|
472
|
+
#
|
473
|
+
# @yield [result, err] Result & error if block supplied
|
474
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannel] parsed result object
|
475
|
+
# @yieldparam err [StandardError] error object if request failed
|
476
|
+
#
|
477
|
+
# @return [Google::Apis::AdsenseV1_4::CustomChannel]
|
478
|
+
#
|
479
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
480
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
481
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
482
|
+
def get_account_custom_channel(account_id, ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
483
|
+
command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}', options)
|
484
|
+
command.response_representation = Google::Apis::AdsenseV1_4::CustomChannel::Representation
|
485
|
+
command.response_class = Google::Apis::AdsenseV1_4::CustomChannel
|
486
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
487
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
488
|
+
command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
|
489
|
+
command.query['fields'] = fields unless fields.nil?
|
490
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
491
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
492
|
+
execute_or_queue_command(command, &block)
|
493
|
+
end
|
494
|
+
|
495
|
+
# List all custom channels in the specified ad client for the specified account.
|
496
|
+
# @param [String] account_id
|
497
|
+
# Account to which the ad client belongs.
|
498
|
+
# @param [String] ad_client_id
|
499
|
+
# Ad client for which to list custom channels.
|
500
|
+
# @param [Fixnum] max_results
|
501
|
+
# The maximum number of custom channels to include in the response, used for
|
502
|
+
# paging.
|
503
|
+
# @param [String] page_token
|
504
|
+
# A continuation token, used to page through custom channels. To retrieve the
|
505
|
+
# next page, set this parameter to the value of "nextPageToken" from the
|
506
|
+
# previous response.
|
507
|
+
# @param [String] fields
|
508
|
+
# Selector specifying which fields to include in a partial response.
|
509
|
+
# @param [String] quota_user
|
510
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
511
|
+
# characters.
|
512
|
+
# @param [String] user_ip
|
513
|
+
# Deprecated. Please use quotaUser instead.
|
514
|
+
# @param [Google::Apis::RequestOptions] options
|
515
|
+
# Request-specific options
|
516
|
+
#
|
517
|
+
# @yield [result, err] Result & error if block supplied
|
518
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object
|
519
|
+
# @yieldparam err [StandardError] error object if request failed
|
520
|
+
#
|
521
|
+
# @return [Google::Apis::AdsenseV1_4::CustomChannels]
|
522
|
+
#
|
523
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
524
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
525
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
526
|
+
def list_account_custom_channels(account_id, ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
527
|
+
command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/customchannels', options)
|
528
|
+
command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation
|
529
|
+
command.response_class = Google::Apis::AdsenseV1_4::CustomChannels
|
530
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
531
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
532
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
533
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
534
|
+
command.query['fields'] = fields unless fields.nil?
|
535
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
536
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
537
|
+
execute_or_queue_command(command, &block)
|
538
|
+
end
|
539
|
+
|
540
|
+
# List all ad units in the specified custom channel.
|
541
|
+
# @param [String] account_id
|
542
|
+
# Account to which the ad client belongs.
|
543
|
+
# @param [String] ad_client_id
|
544
|
+
# Ad client which contains the custom channel.
|
545
|
+
# @param [String] custom_channel_id
|
546
|
+
# Custom channel for which to list ad units.
|
547
|
+
# @param [Boolean] include_inactive
|
548
|
+
# Whether to include inactive ad units. Default: true.
|
549
|
+
# @param [Fixnum] max_results
|
550
|
+
# The maximum number of ad units to include in the response, used for paging.
|
551
|
+
# @param [String] page_token
|
552
|
+
# A continuation token, used to page through ad units. To retrieve the next page,
|
553
|
+
# set this parameter to the value of "nextPageToken" from the previous response.
|
554
|
+
# @param [String] fields
|
555
|
+
# Selector specifying which fields to include in a partial response.
|
556
|
+
# @param [String] quota_user
|
557
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
558
|
+
# characters.
|
559
|
+
# @param [String] user_ip
|
560
|
+
# Deprecated. Please use quotaUser instead.
|
561
|
+
# @param [Google::Apis::RequestOptions] options
|
562
|
+
# Request-specific options
|
563
|
+
#
|
564
|
+
# @yield [result, err] Result & error if block supplied
|
565
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object
|
566
|
+
# @yieldparam err [StandardError] error object if request failed
|
567
|
+
#
|
568
|
+
# @return [Google::Apis::AdsenseV1_4::AdUnits]
|
569
|
+
#
|
570
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
571
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
572
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
573
|
+
def list_account_custom_channel_ad_units(account_id, ad_client_id, custom_channel_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
574
|
+
command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}/adunits', options)
|
575
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation
|
576
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdUnits
|
577
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
578
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
579
|
+
command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
|
580
|
+
command.query['includeInactive'] = include_inactive unless include_inactive.nil?
|
581
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
582
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
583
|
+
command.query['fields'] = fields unless fields.nil?
|
584
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
585
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
586
|
+
execute_or_queue_command(command, &block)
|
587
|
+
end
|
588
|
+
|
589
|
+
# List the payments for the specified AdSense account.
|
590
|
+
# @param [String] account_id
|
591
|
+
# Account for which to retrieve the payments.
|
592
|
+
# @param [String] fields
|
593
|
+
# Selector specifying which fields to include in a partial response.
|
594
|
+
# @param [String] quota_user
|
595
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
596
|
+
# characters.
|
597
|
+
# @param [String] user_ip
|
598
|
+
# Deprecated. Please use quotaUser instead.
|
599
|
+
# @param [Google::Apis::RequestOptions] options
|
600
|
+
# Request-specific options
|
601
|
+
#
|
602
|
+
# @yield [result, err] Result & error if block supplied
|
603
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Payments] parsed result object
|
604
|
+
# @yieldparam err [StandardError] error object if request failed
|
605
|
+
#
|
606
|
+
# @return [Google::Apis::AdsenseV1_4::Payments]
|
607
|
+
#
|
608
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
609
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
610
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
611
|
+
def list_account_payments(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
612
|
+
command = make_simple_command(:get, 'accounts/{accountId}/payments', options)
|
613
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Payments::Representation
|
614
|
+
command.response_class = Google::Apis::AdsenseV1_4::Payments
|
615
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
616
|
+
command.query['fields'] = fields unless fields.nil?
|
617
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
618
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
619
|
+
execute_or_queue_command(command, &block)
|
620
|
+
end
|
621
|
+
|
622
|
+
# Generate an AdSense report based on the report request sent in the query
|
623
|
+
# parameters. Returns the result as JSON; to retrieve output in CSV format
|
624
|
+
# specify "alt=csv" as a query parameter.
|
625
|
+
# @param [String] account_id
|
626
|
+
# Account upon which to report.
|
627
|
+
# @param [String] start_date
|
628
|
+
# Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
|
629
|
+
# @param [String] end_date
|
630
|
+
# End of the date range to report on in "YYYY-MM-DD" format, inclusive.
|
631
|
+
# @param [String] currency
|
632
|
+
# Optional currency to use when reporting on monetary metrics. Defaults to the
|
633
|
+
# account's currency if not set.
|
634
|
+
# @param [Array<String>, String] dimension
|
635
|
+
# Dimensions to base the report on.
|
636
|
+
# @param [Array<String>, String] filter
|
637
|
+
# Filters to be run on the report.
|
638
|
+
# @param [String] locale
|
639
|
+
# Optional locale to use for translating report output to a local language.
|
640
|
+
# Defaults to "en_US" if not specified.
|
641
|
+
# @param [Fixnum] max_results
|
642
|
+
# The maximum number of rows of report data to return.
|
643
|
+
# @param [Array<String>, String] metric
|
644
|
+
# Numeric columns to include in the report.
|
645
|
+
# @param [Array<String>, String] sort
|
646
|
+
# The name of a dimension or metric to sort the resulting report on, optionally
|
647
|
+
# prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is
|
648
|
+
# specified, the column is sorted ascending.
|
649
|
+
# @param [Fixnum] start_index
|
650
|
+
# Index of the first row of report data to return.
|
651
|
+
# @param [Boolean] use_timezone_reporting
|
652
|
+
# Whether the report should be generated in the AdSense account's local timezone.
|
653
|
+
# If false default PST/PDT timezone will be used.
|
654
|
+
# @param [String] fields
|
655
|
+
# Selector specifying which fields to include in a partial response.
|
656
|
+
# @param [String] quota_user
|
657
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
658
|
+
# characters.
|
659
|
+
# @param [String] user_ip
|
660
|
+
# Deprecated. Please use quotaUser instead.
|
661
|
+
# @param [IO, String] download_dest
|
662
|
+
# IO stream or filename to receive content download
|
663
|
+
# @param [Google::Apis::RequestOptions] options
|
664
|
+
# Request-specific options
|
665
|
+
#
|
666
|
+
# @yield [result, err] Result & error if block supplied
|
667
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::GenerateReportResponse] parsed result object
|
668
|
+
# @yieldparam err [StandardError] error object if request failed
|
669
|
+
#
|
670
|
+
# @return [Google::Apis::AdsenseV1_4::GenerateReportResponse]
|
671
|
+
#
|
672
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
673
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
674
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
675
|
+
def generate_account_report(account_id, start_date, end_date, currency: nil, dimension: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_index: nil, use_timezone_reporting: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
676
|
+
if download_dest.nil?
|
677
|
+
command = make_simple_command(:get, 'accounts/{accountId}/reports', options)
|
678
|
+
else
|
679
|
+
command = make_download_command(:get, 'accounts/{accountId}/reports', options)
|
680
|
+
command.download_dest = download_dest
|
681
|
+
end
|
682
|
+
command.response_representation = Google::Apis::AdsenseV1_4::GenerateReportResponse::Representation
|
683
|
+
command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse
|
684
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
685
|
+
command.query['currency'] = currency unless currency.nil?
|
686
|
+
command.query['dimension'] = dimension unless dimension.nil?
|
687
|
+
command.query['endDate'] = end_date unless end_date.nil?
|
688
|
+
command.query['filter'] = filter unless filter.nil?
|
689
|
+
command.query['locale'] = locale unless locale.nil?
|
690
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
691
|
+
command.query['metric'] = metric unless metric.nil?
|
692
|
+
command.query['sort'] = sort unless sort.nil?
|
693
|
+
command.query['startDate'] = start_date unless start_date.nil?
|
694
|
+
command.query['startIndex'] = start_index unless start_index.nil?
|
695
|
+
command.query['useTimezoneReporting'] = use_timezone_reporting unless use_timezone_reporting.nil?
|
696
|
+
command.query['fields'] = fields unless fields.nil?
|
697
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
698
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
699
|
+
execute_or_queue_command(command, &block)
|
700
|
+
end
|
701
|
+
|
702
|
+
# Generate an AdSense report based on the saved report ID sent in the query
|
703
|
+
# parameters.
|
704
|
+
# @param [String] account_id
|
705
|
+
# Account to which the saved reports belong.
|
706
|
+
# @param [String] saved_report_id
|
707
|
+
# The saved report to retrieve.
|
708
|
+
# @param [String] locale
|
709
|
+
# Optional locale to use for translating report output to a local language.
|
710
|
+
# Defaults to "en_US" if not specified.
|
711
|
+
# @param [Fixnum] max_results
|
712
|
+
# The maximum number of rows of report data to return.
|
713
|
+
# @param [Fixnum] start_index
|
714
|
+
# Index of the first row of report data to return.
|
715
|
+
# @param [String] fields
|
716
|
+
# Selector specifying which fields to include in a partial response.
|
717
|
+
# @param [String] quota_user
|
718
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
719
|
+
# characters.
|
720
|
+
# @param [String] user_ip
|
721
|
+
# Deprecated. Please use quotaUser instead.
|
722
|
+
# @param [Google::Apis::RequestOptions] options
|
723
|
+
# Request-specific options
|
724
|
+
#
|
725
|
+
# @yield [result, err] Result & error if block supplied
|
726
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::GenerateReportResponse] parsed result object
|
727
|
+
# @yieldparam err [StandardError] error object if request failed
|
728
|
+
#
|
729
|
+
# @return [Google::Apis::AdsenseV1_4::GenerateReportResponse]
|
730
|
+
#
|
731
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
732
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
733
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
734
|
+
def generate_account_saved_report(account_id, saved_report_id, locale: nil, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
735
|
+
command = make_simple_command(:get, 'accounts/{accountId}/reports/{savedReportId}', options)
|
736
|
+
command.response_representation = Google::Apis::AdsenseV1_4::GenerateReportResponse::Representation
|
737
|
+
command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse
|
738
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
739
|
+
command.params['savedReportId'] = saved_report_id unless saved_report_id.nil?
|
740
|
+
command.query['locale'] = locale unless locale.nil?
|
741
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
742
|
+
command.query['startIndex'] = start_index unless start_index.nil?
|
743
|
+
command.query['fields'] = fields unless fields.nil?
|
744
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
745
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
746
|
+
execute_or_queue_command(command, &block)
|
747
|
+
end
|
748
|
+
|
749
|
+
# List all saved reports in the specified AdSense account.
|
750
|
+
# @param [String] account_id
|
751
|
+
# Account to which the saved reports belong.
|
752
|
+
# @param [Fixnum] max_results
|
753
|
+
# The maximum number of saved reports to include in the response, used for
|
754
|
+
# paging.
|
755
|
+
# @param [String] page_token
|
756
|
+
# A continuation token, used to page through saved reports. To retrieve the next
|
757
|
+
# page, set this parameter to the value of "nextPageToken" from the previous
|
758
|
+
# response.
|
759
|
+
# @param [String] fields
|
760
|
+
# Selector specifying which fields to include in a partial response.
|
761
|
+
# @param [String] quota_user
|
762
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
763
|
+
# characters.
|
764
|
+
# @param [String] user_ip
|
765
|
+
# Deprecated. Please use quotaUser instead.
|
766
|
+
# @param [Google::Apis::RequestOptions] options
|
767
|
+
# Request-specific options
|
768
|
+
#
|
769
|
+
# @yield [result, err] Result & error if block supplied
|
770
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::SavedReports] parsed result object
|
771
|
+
# @yieldparam err [StandardError] error object if request failed
|
772
|
+
#
|
773
|
+
# @return [Google::Apis::AdsenseV1_4::SavedReports]
|
774
|
+
#
|
775
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
776
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
777
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
778
|
+
def list_account_saved_reports(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
779
|
+
command = make_simple_command(:get, 'accounts/{accountId}/reports/saved', options)
|
780
|
+
command.response_representation = Google::Apis::AdsenseV1_4::SavedReports::Representation
|
781
|
+
command.response_class = Google::Apis::AdsenseV1_4::SavedReports
|
782
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
783
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
784
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
785
|
+
command.query['fields'] = fields unless fields.nil?
|
786
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
787
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
788
|
+
execute_or_queue_command(command, &block)
|
789
|
+
end
|
790
|
+
|
791
|
+
# List a specific saved ad style for the specified account.
|
792
|
+
# @param [String] account_id
|
793
|
+
# Account for which to get the saved ad style.
|
794
|
+
# @param [String] saved_ad_style_id
|
795
|
+
# Saved ad style to retrieve.
|
796
|
+
# @param [String] fields
|
797
|
+
# Selector specifying which fields to include in a partial response.
|
798
|
+
# @param [String] quota_user
|
799
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
800
|
+
# characters.
|
801
|
+
# @param [String] user_ip
|
802
|
+
# Deprecated. Please use quotaUser instead.
|
803
|
+
# @param [Google::Apis::RequestOptions] options
|
804
|
+
# Request-specific options
|
805
|
+
#
|
806
|
+
# @yield [result, err] Result & error if block supplied
|
807
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::SavedAdStyle] parsed result object
|
808
|
+
# @yieldparam err [StandardError] error object if request failed
|
809
|
+
#
|
810
|
+
# @return [Google::Apis::AdsenseV1_4::SavedAdStyle]
|
811
|
+
#
|
812
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
813
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
814
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
815
|
+
def get_account_saved_ad_style(account_id, saved_ad_style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
816
|
+
command = make_simple_command(:get, 'accounts/{accountId}/savedadstyles/{savedAdStyleId}', options)
|
817
|
+
command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyle::Representation
|
818
|
+
command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyle
|
819
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
820
|
+
command.params['savedAdStyleId'] = saved_ad_style_id unless saved_ad_style_id.nil?
|
821
|
+
command.query['fields'] = fields unless fields.nil?
|
822
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
823
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
824
|
+
execute_or_queue_command(command, &block)
|
825
|
+
end
|
826
|
+
|
827
|
+
# List all saved ad styles in the specified account.
|
828
|
+
# @param [String] account_id
|
829
|
+
# Account for which to list saved ad styles.
|
830
|
+
# @param [Fixnum] max_results
|
831
|
+
# The maximum number of saved ad styles to include in the response, used for
|
832
|
+
# paging.
|
833
|
+
# @param [String] page_token
|
834
|
+
# A continuation token, used to page through saved ad styles. To retrieve the
|
835
|
+
# next page, set this parameter to the value of "nextPageToken" from the
|
836
|
+
# previous response.
|
837
|
+
# @param [String] fields
|
838
|
+
# Selector specifying which fields to include in a partial response.
|
839
|
+
# @param [String] quota_user
|
840
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
841
|
+
# characters.
|
842
|
+
# @param [String] user_ip
|
843
|
+
# Deprecated. Please use quotaUser instead.
|
844
|
+
# @param [Google::Apis::RequestOptions] options
|
845
|
+
# Request-specific options
|
846
|
+
#
|
847
|
+
# @yield [result, err] Result & error if block supplied
|
848
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::SavedAdStyles] parsed result object
|
849
|
+
# @yieldparam err [StandardError] error object if request failed
|
850
|
+
#
|
851
|
+
# @return [Google::Apis::AdsenseV1_4::SavedAdStyles]
|
852
|
+
#
|
853
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
854
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
855
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
856
|
+
def list_account_saved_ad_styles(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
857
|
+
command = make_simple_command(:get, 'accounts/{accountId}/savedadstyles', options)
|
858
|
+
command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyles::Representation
|
859
|
+
command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyles
|
860
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
861
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
862
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
863
|
+
command.query['fields'] = fields unless fields.nil?
|
864
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
865
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
866
|
+
execute_or_queue_command(command, &block)
|
867
|
+
end
|
868
|
+
|
869
|
+
# List all URL channels in the specified ad client for the specified account.
|
870
|
+
# @param [String] account_id
|
871
|
+
# Account to which the ad client belongs.
|
872
|
+
# @param [String] ad_client_id
|
873
|
+
# Ad client for which to list URL channels.
|
874
|
+
# @param [Fixnum] max_results
|
875
|
+
# The maximum number of URL channels to include in the response, used for paging.
|
876
|
+
# @param [String] page_token
|
877
|
+
# A continuation token, used to page through URL channels. To retrieve the next
|
878
|
+
# page, set this parameter to the value of "nextPageToken" from the previous
|
879
|
+
# response.
|
880
|
+
# @param [String] fields
|
881
|
+
# Selector specifying which fields to include in a partial response.
|
882
|
+
# @param [String] quota_user
|
883
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
884
|
+
# characters.
|
885
|
+
# @param [String] user_ip
|
886
|
+
# Deprecated. Please use quotaUser instead.
|
887
|
+
# @param [Google::Apis::RequestOptions] options
|
888
|
+
# Request-specific options
|
889
|
+
#
|
890
|
+
# @yield [result, err] Result & error if block supplied
|
891
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::UrlChannels] parsed result object
|
892
|
+
# @yieldparam err [StandardError] error object if request failed
|
893
|
+
#
|
894
|
+
# @return [Google::Apis::AdsenseV1_4::UrlChannels]
|
895
|
+
#
|
896
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
897
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
898
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
899
|
+
def list_account_url_channels(account_id, ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
900
|
+
command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/urlchannels', options)
|
901
|
+
command.response_representation = Google::Apis::AdsenseV1_4::UrlChannels::Representation
|
902
|
+
command.response_class = Google::Apis::AdsenseV1_4::UrlChannels
|
903
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
904
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
905
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
906
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
907
|
+
command.query['fields'] = fields unless fields.nil?
|
908
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
909
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
910
|
+
execute_or_queue_command(command, &block)
|
911
|
+
end
|
912
|
+
|
913
|
+
# List all ad clients in this AdSense account.
|
914
|
+
# @param [Fixnum] max_results
|
915
|
+
# The maximum number of ad clients to include in the response, used for paging.
|
916
|
+
# @param [String] page_token
|
917
|
+
# A continuation token, used to page through ad clients. To retrieve the next
|
918
|
+
# page, set this parameter to the value of "nextPageToken" from the previous
|
919
|
+
# response.
|
920
|
+
# @param [String] fields
|
921
|
+
# Selector specifying which fields to include in a partial response.
|
922
|
+
# @param [String] quota_user
|
923
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
924
|
+
# characters.
|
925
|
+
# @param [String] user_ip
|
926
|
+
# Deprecated. Please use quotaUser instead.
|
927
|
+
# @param [Google::Apis::RequestOptions] options
|
928
|
+
# Request-specific options
|
929
|
+
#
|
930
|
+
# @yield [result, err] Result & error if block supplied
|
931
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdClients] parsed result object
|
932
|
+
# @yieldparam err [StandardError] error object if request failed
|
933
|
+
#
|
934
|
+
# @return [Google::Apis::AdsenseV1_4::AdClients]
|
935
|
+
#
|
936
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
937
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
938
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
939
|
+
def list_ad_clients(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
940
|
+
command = make_simple_command(:get, 'adclients', options)
|
941
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdClients::Representation
|
942
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdClients
|
943
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
944
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
945
|
+
command.query['fields'] = fields unless fields.nil?
|
946
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
947
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
948
|
+
execute_or_queue_command(command, &block)
|
949
|
+
end
|
950
|
+
|
951
|
+
# Gets the specified ad unit in the specified ad client.
|
952
|
+
# @param [String] ad_client_id
|
953
|
+
# Ad client for which to get the ad unit.
|
954
|
+
# @param [String] ad_unit_id
|
955
|
+
# Ad unit to retrieve.
|
956
|
+
# @param [String] fields
|
957
|
+
# Selector specifying which fields to include in a partial response.
|
958
|
+
# @param [String] quota_user
|
959
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
960
|
+
# characters.
|
961
|
+
# @param [String] user_ip
|
962
|
+
# Deprecated. Please use quotaUser instead.
|
963
|
+
# @param [Google::Apis::RequestOptions] options
|
964
|
+
# Request-specific options
|
965
|
+
#
|
966
|
+
# @yield [result, err] Result & error if block supplied
|
967
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdUnit] parsed result object
|
968
|
+
# @yieldparam err [StandardError] error object if request failed
|
969
|
+
#
|
970
|
+
# @return [Google::Apis::AdsenseV1_4::AdUnit]
|
971
|
+
#
|
972
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
973
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
974
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
975
|
+
def get_ad_unit(ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
976
|
+
command = make_simple_command(:get, 'adclients/{adClientId}/adunits/{adUnitId}', options)
|
977
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdUnit::Representation
|
978
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdUnit
|
979
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
980
|
+
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
981
|
+
command.query['fields'] = fields unless fields.nil?
|
982
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
983
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
984
|
+
execute_or_queue_command(command, &block)
|
985
|
+
end
|
986
|
+
|
987
|
+
# Get ad code for the specified ad unit.
|
988
|
+
# @param [String] ad_client_id
|
989
|
+
# Ad client with contains the ad unit.
|
990
|
+
# @param [String] ad_unit_id
|
991
|
+
# Ad unit to get the code for.
|
992
|
+
# @param [String] fields
|
993
|
+
# Selector specifying which fields to include in a partial response.
|
994
|
+
# @param [String] quota_user
|
995
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
996
|
+
# characters.
|
997
|
+
# @param [String] user_ip
|
998
|
+
# Deprecated. Please use quotaUser instead.
|
999
|
+
# @param [Google::Apis::RequestOptions] options
|
1000
|
+
# Request-specific options
|
1001
|
+
#
|
1002
|
+
# @yield [result, err] Result & error if block supplied
|
1003
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdCode] parsed result object
|
1004
|
+
# @yieldparam err [StandardError] error object if request failed
|
1005
|
+
#
|
1006
|
+
# @return [Google::Apis::AdsenseV1_4::AdCode]
|
1007
|
+
#
|
1008
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1009
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1010
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1011
|
+
def get_ad_code_ad_unit(ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1012
|
+
command = make_simple_command(:get, 'adclients/{adClientId}/adunits/{adUnitId}/adcode', options)
|
1013
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdCode::Representation
|
1014
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdCode
|
1015
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1016
|
+
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
1017
|
+
command.query['fields'] = fields unless fields.nil?
|
1018
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1019
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1020
|
+
execute_or_queue_command(command, &block)
|
1021
|
+
end
|
1022
|
+
|
1023
|
+
# List all ad units in the specified ad client for this AdSense account.
|
1024
|
+
# @param [String] ad_client_id
|
1025
|
+
# Ad client for which to list ad units.
|
1026
|
+
# @param [Boolean] include_inactive
|
1027
|
+
# Whether to include inactive ad units. Default: true.
|
1028
|
+
# @param [Fixnum] max_results
|
1029
|
+
# The maximum number of ad units to include in the response, used for paging.
|
1030
|
+
# @param [String] page_token
|
1031
|
+
# A continuation token, used to page through ad units. To retrieve the next page,
|
1032
|
+
# set this parameter to the value of "nextPageToken" from the previous response.
|
1033
|
+
# @param [String] fields
|
1034
|
+
# Selector specifying which fields to include in a partial response.
|
1035
|
+
# @param [String] quota_user
|
1036
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1037
|
+
# characters.
|
1038
|
+
# @param [String] user_ip
|
1039
|
+
# Deprecated. Please use quotaUser instead.
|
1040
|
+
# @param [Google::Apis::RequestOptions] options
|
1041
|
+
# Request-specific options
|
1042
|
+
#
|
1043
|
+
# @yield [result, err] Result & error if block supplied
|
1044
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object
|
1045
|
+
# @yieldparam err [StandardError] error object if request failed
|
1046
|
+
#
|
1047
|
+
# @return [Google::Apis::AdsenseV1_4::AdUnits]
|
1048
|
+
#
|
1049
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1050
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1051
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1052
|
+
def list_ad_units(ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1053
|
+
command = make_simple_command(:get, 'adclients/{adClientId}/adunits', options)
|
1054
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation
|
1055
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdUnits
|
1056
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1057
|
+
command.query['includeInactive'] = include_inactive unless include_inactive.nil?
|
1058
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1059
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1060
|
+
command.query['fields'] = fields unless fields.nil?
|
1061
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1062
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1063
|
+
execute_or_queue_command(command, &block)
|
1064
|
+
end
|
1065
|
+
|
1066
|
+
# List all custom channels which the specified ad unit belongs to.
|
1067
|
+
# @param [String] ad_client_id
|
1068
|
+
# Ad client which contains the ad unit.
|
1069
|
+
# @param [String] ad_unit_id
|
1070
|
+
# Ad unit for which to list custom channels.
|
1071
|
+
# @param [Fixnum] max_results
|
1072
|
+
# The maximum number of custom channels to include in the response, used for
|
1073
|
+
# paging.
|
1074
|
+
# @param [String] page_token
|
1075
|
+
# A continuation token, used to page through custom channels. To retrieve the
|
1076
|
+
# next page, set this parameter to the value of "nextPageToken" from the
|
1077
|
+
# previous response.
|
1078
|
+
# @param [String] fields
|
1079
|
+
# Selector specifying which fields to include in a partial response.
|
1080
|
+
# @param [String] quota_user
|
1081
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1082
|
+
# characters.
|
1083
|
+
# @param [String] user_ip
|
1084
|
+
# Deprecated. Please use quotaUser instead.
|
1085
|
+
# @param [Google::Apis::RequestOptions] options
|
1086
|
+
# Request-specific options
|
1087
|
+
#
|
1088
|
+
# @yield [result, err] Result & error if block supplied
|
1089
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object
|
1090
|
+
# @yieldparam err [StandardError] error object if request failed
|
1091
|
+
#
|
1092
|
+
# @return [Google::Apis::AdsenseV1_4::CustomChannels]
|
1093
|
+
#
|
1094
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1095
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1096
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1097
|
+
def list_ad_unit_custom_channels(ad_client_id, ad_unit_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1098
|
+
command = make_simple_command(:get, 'adclients/{adClientId}/adunits/{adUnitId}/customchannels', options)
|
1099
|
+
command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation
|
1100
|
+
command.response_class = Google::Apis::AdsenseV1_4::CustomChannels
|
1101
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1102
|
+
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
1103
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1104
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1105
|
+
command.query['fields'] = fields unless fields.nil?
|
1106
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1107
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1108
|
+
execute_or_queue_command(command, &block)
|
1109
|
+
end
|
1110
|
+
|
1111
|
+
# Dismiss (delete) the specified alert from the publisher's AdSense account.
|
1112
|
+
# @param [String] alert_id
|
1113
|
+
# Alert to delete.
|
1114
|
+
# @param [String] fields
|
1115
|
+
# Selector specifying which fields to include in a partial response.
|
1116
|
+
# @param [String] quota_user
|
1117
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1118
|
+
# characters.
|
1119
|
+
# @param [String] user_ip
|
1120
|
+
# Deprecated. Please use quotaUser instead.
|
1121
|
+
# @param [Google::Apis::RequestOptions] options
|
1122
|
+
# Request-specific options
|
1123
|
+
#
|
1124
|
+
# @yield [result, err] Result & error if block supplied
|
1125
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1126
|
+
# @yieldparam err [StandardError] error object if request failed
|
1127
|
+
#
|
1128
|
+
# @return [void]
|
1129
|
+
#
|
1130
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1131
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1132
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1133
|
+
def delete_alert(alert_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1134
|
+
command = make_simple_command(:delete, 'alerts/{alertId}', options)
|
1135
|
+
command.params['alertId'] = alert_id unless alert_id.nil?
|
1136
|
+
command.query['fields'] = fields unless fields.nil?
|
1137
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1138
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1139
|
+
execute_or_queue_command(command, &block)
|
1140
|
+
end
|
1141
|
+
|
1142
|
+
# List the alerts for this AdSense account.
|
1143
|
+
# @param [String] locale
|
1144
|
+
# The locale to use for translating alert messages. The account locale will be
|
1145
|
+
# used if this is not supplied. The AdSense default (English) will be used if
|
1146
|
+
# the supplied locale is invalid or unsupported.
|
1147
|
+
# @param [String] fields
|
1148
|
+
# Selector specifying which fields to include in a partial response.
|
1149
|
+
# @param [String] quota_user
|
1150
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1151
|
+
# characters.
|
1152
|
+
# @param [String] user_ip
|
1153
|
+
# Deprecated. Please use quotaUser instead.
|
1154
|
+
# @param [Google::Apis::RequestOptions] options
|
1155
|
+
# Request-specific options
|
1156
|
+
#
|
1157
|
+
# @yield [result, err] Result & error if block supplied
|
1158
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Alerts] parsed result object
|
1159
|
+
# @yieldparam err [StandardError] error object if request failed
|
1160
|
+
#
|
1161
|
+
# @return [Google::Apis::AdsenseV1_4::Alerts]
|
1162
|
+
#
|
1163
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1164
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1165
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1166
|
+
def list_alerts(locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1167
|
+
command = make_simple_command(:get, 'alerts', options)
|
1168
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Alerts::Representation
|
1169
|
+
command.response_class = Google::Apis::AdsenseV1_4::Alerts
|
1170
|
+
command.query['locale'] = locale unless locale.nil?
|
1171
|
+
command.query['fields'] = fields unless fields.nil?
|
1172
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1173
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1174
|
+
execute_or_queue_command(command, &block)
|
1175
|
+
end
|
1176
|
+
|
1177
|
+
# Get the specified custom channel from the specified ad client.
|
1178
|
+
# @param [String] ad_client_id
|
1179
|
+
# Ad client which contains the custom channel.
|
1180
|
+
# @param [String] custom_channel_id
|
1181
|
+
# Custom channel to retrieve.
|
1182
|
+
# @param [String] fields
|
1183
|
+
# Selector specifying which fields to include in a partial response.
|
1184
|
+
# @param [String] quota_user
|
1185
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1186
|
+
# characters.
|
1187
|
+
# @param [String] user_ip
|
1188
|
+
# Deprecated. Please use quotaUser instead.
|
1189
|
+
# @param [Google::Apis::RequestOptions] options
|
1190
|
+
# Request-specific options
|
1191
|
+
#
|
1192
|
+
# @yield [result, err] Result & error if block supplied
|
1193
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannel] parsed result object
|
1194
|
+
# @yieldparam err [StandardError] error object if request failed
|
1195
|
+
#
|
1196
|
+
# @return [Google::Apis::AdsenseV1_4::CustomChannel]
|
1197
|
+
#
|
1198
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1199
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1200
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1201
|
+
def get_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1202
|
+
command = make_simple_command(:get, 'adclients/{adClientId}/customchannels/{customChannelId}', options)
|
1203
|
+
command.response_representation = Google::Apis::AdsenseV1_4::CustomChannel::Representation
|
1204
|
+
command.response_class = Google::Apis::AdsenseV1_4::CustomChannel
|
1205
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1206
|
+
command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
|
1207
|
+
command.query['fields'] = fields unless fields.nil?
|
1208
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1209
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1210
|
+
execute_or_queue_command(command, &block)
|
1211
|
+
end
|
1212
|
+
|
1213
|
+
# List all custom channels in the specified ad client for this AdSense account.
|
1214
|
+
# @param [String] ad_client_id
|
1215
|
+
# Ad client for which to list custom channels.
|
1216
|
+
# @param [Fixnum] max_results
|
1217
|
+
# The maximum number of custom channels to include in the response, used for
|
1218
|
+
# paging.
|
1219
|
+
# @param [String] page_token
|
1220
|
+
# A continuation token, used to page through custom channels. To retrieve the
|
1221
|
+
# next page, set this parameter to the value of "nextPageToken" from the
|
1222
|
+
# previous response.
|
1223
|
+
# @param [String] fields
|
1224
|
+
# Selector specifying which fields to include in a partial response.
|
1225
|
+
# @param [String] quota_user
|
1226
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1227
|
+
# characters.
|
1228
|
+
# @param [String] user_ip
|
1229
|
+
# Deprecated. Please use quotaUser instead.
|
1230
|
+
# @param [Google::Apis::RequestOptions] options
|
1231
|
+
# Request-specific options
|
1232
|
+
#
|
1233
|
+
# @yield [result, err] Result & error if block supplied
|
1234
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object
|
1235
|
+
# @yieldparam err [StandardError] error object if request failed
|
1236
|
+
#
|
1237
|
+
# @return [Google::Apis::AdsenseV1_4::CustomChannels]
|
1238
|
+
#
|
1239
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1240
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1241
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1242
|
+
def list_custom_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1243
|
+
command = make_simple_command(:get, 'adclients/{adClientId}/customchannels', options)
|
1244
|
+
command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation
|
1245
|
+
command.response_class = Google::Apis::AdsenseV1_4::CustomChannels
|
1246
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1247
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1248
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1249
|
+
command.query['fields'] = fields unless fields.nil?
|
1250
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1251
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1252
|
+
execute_or_queue_command(command, &block)
|
1253
|
+
end
|
1254
|
+
|
1255
|
+
# List all ad units in the specified custom channel.
|
1256
|
+
# @param [String] ad_client_id
|
1257
|
+
# Ad client which contains the custom channel.
|
1258
|
+
# @param [String] custom_channel_id
|
1259
|
+
# Custom channel for which to list ad units.
|
1260
|
+
# @param [Boolean] include_inactive
|
1261
|
+
# Whether to include inactive ad units. Default: true.
|
1262
|
+
# @param [Fixnum] max_results
|
1263
|
+
# The maximum number of ad units to include in the response, used for paging.
|
1264
|
+
# @param [String] page_token
|
1265
|
+
# A continuation token, used to page through ad units. To retrieve the next page,
|
1266
|
+
# set this parameter to the value of "nextPageToken" from the previous response.
|
1267
|
+
# @param [String] fields
|
1268
|
+
# Selector specifying which fields to include in a partial response.
|
1269
|
+
# @param [String] quota_user
|
1270
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1271
|
+
# characters.
|
1272
|
+
# @param [String] user_ip
|
1273
|
+
# Deprecated. Please use quotaUser instead.
|
1274
|
+
# @param [Google::Apis::RequestOptions] options
|
1275
|
+
# Request-specific options
|
1276
|
+
#
|
1277
|
+
# @yield [result, err] Result & error if block supplied
|
1278
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object
|
1279
|
+
# @yieldparam err [StandardError] error object if request failed
|
1280
|
+
#
|
1281
|
+
# @return [Google::Apis::AdsenseV1_4::AdUnits]
|
1282
|
+
#
|
1283
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1284
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1285
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1286
|
+
def list_custom_channel_ad_units(ad_client_id, custom_channel_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1287
|
+
command = make_simple_command(:get, 'adclients/{adClientId}/customchannels/{customChannelId}/adunits', options)
|
1288
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation
|
1289
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdUnits
|
1290
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1291
|
+
command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
|
1292
|
+
command.query['includeInactive'] = include_inactive unless include_inactive.nil?
|
1293
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1294
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1295
|
+
command.query['fields'] = fields unless fields.nil?
|
1296
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1297
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1298
|
+
execute_or_queue_command(command, &block)
|
1299
|
+
end
|
1300
|
+
|
1301
|
+
# List the metadata for the dimensions available to this AdSense account.
|
1302
|
+
# @param [String] fields
|
1303
|
+
# Selector specifying which fields to include in a partial response.
|
1304
|
+
# @param [String] quota_user
|
1305
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1306
|
+
# characters.
|
1307
|
+
# @param [String] user_ip
|
1308
|
+
# Deprecated. Please use quotaUser instead.
|
1309
|
+
# @param [Google::Apis::RequestOptions] options
|
1310
|
+
# Request-specific options
|
1311
|
+
#
|
1312
|
+
# @yield [result, err] Result & error if block supplied
|
1313
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Metadata] parsed result object
|
1314
|
+
# @yieldparam err [StandardError] error object if request failed
|
1315
|
+
#
|
1316
|
+
# @return [Google::Apis::AdsenseV1_4::Metadata]
|
1317
|
+
#
|
1318
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1319
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1320
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1321
|
+
def list_metadata_dimensions(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1322
|
+
command = make_simple_command(:get, 'metadata/dimensions', options)
|
1323
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Metadata::Representation
|
1324
|
+
command.response_class = Google::Apis::AdsenseV1_4::Metadata
|
1325
|
+
command.query['fields'] = fields unless fields.nil?
|
1326
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1327
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1328
|
+
execute_or_queue_command(command, &block)
|
1329
|
+
end
|
1330
|
+
|
1331
|
+
# List the metadata for the metrics available to this AdSense account.
|
1332
|
+
# @param [String] fields
|
1333
|
+
# Selector specifying which fields to include in a partial response.
|
1334
|
+
# @param [String] quota_user
|
1335
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1336
|
+
# characters.
|
1337
|
+
# @param [String] user_ip
|
1338
|
+
# Deprecated. Please use quotaUser instead.
|
1339
|
+
# @param [Google::Apis::RequestOptions] options
|
1340
|
+
# Request-specific options
|
1341
|
+
#
|
1342
|
+
# @yield [result, err] Result & error if block supplied
|
1343
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Metadata] parsed result object
|
1344
|
+
# @yieldparam err [StandardError] error object if request failed
|
1345
|
+
#
|
1346
|
+
# @return [Google::Apis::AdsenseV1_4::Metadata]
|
1347
|
+
#
|
1348
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1349
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1350
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1351
|
+
def list_metadata_metrics(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1352
|
+
command = make_simple_command(:get, 'metadata/metrics', options)
|
1353
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Metadata::Representation
|
1354
|
+
command.response_class = Google::Apis::AdsenseV1_4::Metadata
|
1355
|
+
command.query['fields'] = fields unless fields.nil?
|
1356
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1357
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1358
|
+
execute_or_queue_command(command, &block)
|
1359
|
+
end
|
1360
|
+
|
1361
|
+
# List the payments for this AdSense account.
|
1362
|
+
# @param [String] fields
|
1363
|
+
# Selector specifying which fields to include in a partial response.
|
1364
|
+
# @param [String] quota_user
|
1365
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1366
|
+
# characters.
|
1367
|
+
# @param [String] user_ip
|
1368
|
+
# Deprecated. Please use quotaUser instead.
|
1369
|
+
# @param [Google::Apis::RequestOptions] options
|
1370
|
+
# Request-specific options
|
1371
|
+
#
|
1372
|
+
# @yield [result, err] Result & error if block supplied
|
1373
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Payments] parsed result object
|
1374
|
+
# @yieldparam err [StandardError] error object if request failed
|
1375
|
+
#
|
1376
|
+
# @return [Google::Apis::AdsenseV1_4::Payments]
|
1377
|
+
#
|
1378
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1379
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1380
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1381
|
+
def list_payments(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1382
|
+
command = make_simple_command(:get, 'payments', options)
|
1383
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Payments::Representation
|
1384
|
+
command.response_class = Google::Apis::AdsenseV1_4::Payments
|
1385
|
+
command.query['fields'] = fields unless fields.nil?
|
1386
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1387
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1388
|
+
execute_or_queue_command(command, &block)
|
1389
|
+
end
|
1390
|
+
|
1391
|
+
# Generate an AdSense report based on the report request sent in the query
|
1392
|
+
# parameters. Returns the result as JSON; to retrieve output in CSV format
|
1393
|
+
# specify "alt=csv" as a query parameter.
|
1394
|
+
# @param [String] start_date
|
1395
|
+
# Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
|
1396
|
+
# @param [String] end_date
|
1397
|
+
# End of the date range to report on in "YYYY-MM-DD" format, inclusive.
|
1398
|
+
# @param [Array<String>, String] account_id
|
1399
|
+
# Accounts upon which to report.
|
1400
|
+
# @param [String] currency
|
1401
|
+
# Optional currency to use when reporting on monetary metrics. Defaults to the
|
1402
|
+
# account's currency if not set.
|
1403
|
+
# @param [Array<String>, String] dimension
|
1404
|
+
# Dimensions to base the report on.
|
1405
|
+
# @param [Array<String>, String] filter
|
1406
|
+
# Filters to be run on the report.
|
1407
|
+
# @param [String] locale
|
1408
|
+
# Optional locale to use for translating report output to a local language.
|
1409
|
+
# Defaults to "en_US" if not specified.
|
1410
|
+
# @param [Fixnum] max_results
|
1411
|
+
# The maximum number of rows of report data to return.
|
1412
|
+
# @param [Array<String>, String] metric
|
1413
|
+
# Numeric columns to include in the report.
|
1414
|
+
# @param [Array<String>, String] sort
|
1415
|
+
# The name of a dimension or metric to sort the resulting report on, optionally
|
1416
|
+
# prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is
|
1417
|
+
# specified, the column is sorted ascending.
|
1418
|
+
# @param [Fixnum] start_index
|
1419
|
+
# Index of the first row of report data to return.
|
1420
|
+
# @param [Boolean] use_timezone_reporting
|
1421
|
+
# Whether the report should be generated in the AdSense account's local timezone.
|
1422
|
+
# If false default PST/PDT timezone will be used.
|
1423
|
+
# @param [String] fields
|
1424
|
+
# Selector specifying which fields to include in a partial response.
|
1425
|
+
# @param [String] quota_user
|
1426
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1427
|
+
# characters.
|
1428
|
+
# @param [String] user_ip
|
1429
|
+
# Deprecated. Please use quotaUser instead.
|
1430
|
+
# @param [IO, String] download_dest
|
1431
|
+
# IO stream or filename to receive content download
|
1432
|
+
# @param [Google::Apis::RequestOptions] options
|
1433
|
+
# Request-specific options
|
1434
|
+
#
|
1435
|
+
# @yield [result, err] Result & error if block supplied
|
1436
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::GenerateReportResponse] parsed result object
|
1437
|
+
# @yieldparam err [StandardError] error object if request failed
|
1438
|
+
#
|
1439
|
+
# @return [Google::Apis::AdsenseV1_4::GenerateReportResponse]
|
1440
|
+
#
|
1441
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1442
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1443
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1444
|
+
def generate_report(start_date, end_date, account_id: nil, currency: nil, dimension: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_index: nil, use_timezone_reporting: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
1445
|
+
if download_dest.nil?
|
1446
|
+
command = make_simple_command(:get, 'reports', options)
|
1447
|
+
else
|
1448
|
+
command = make_download_command(:get, 'reports', options)
|
1449
|
+
command.download_dest = download_dest
|
1450
|
+
end
|
1451
|
+
command.response_representation = Google::Apis::AdsenseV1_4::GenerateReportResponse::Representation
|
1452
|
+
command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse
|
1453
|
+
command.query['accountId'] = account_id unless account_id.nil?
|
1454
|
+
command.query['currency'] = currency unless currency.nil?
|
1455
|
+
command.query['dimension'] = dimension unless dimension.nil?
|
1456
|
+
command.query['endDate'] = end_date unless end_date.nil?
|
1457
|
+
command.query['filter'] = filter unless filter.nil?
|
1458
|
+
command.query['locale'] = locale unless locale.nil?
|
1459
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1460
|
+
command.query['metric'] = metric unless metric.nil?
|
1461
|
+
command.query['sort'] = sort unless sort.nil?
|
1462
|
+
command.query['startDate'] = start_date unless start_date.nil?
|
1463
|
+
command.query['startIndex'] = start_index unless start_index.nil?
|
1464
|
+
command.query['useTimezoneReporting'] = use_timezone_reporting unless use_timezone_reporting.nil?
|
1465
|
+
command.query['fields'] = fields unless fields.nil?
|
1466
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1467
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1468
|
+
execute_or_queue_command(command, &block)
|
1469
|
+
end
|
1470
|
+
|
1471
|
+
# Generate an AdSense report based on the saved report ID sent in the query
|
1472
|
+
# parameters.
|
1473
|
+
# @param [String] saved_report_id
|
1474
|
+
# The saved report to retrieve.
|
1475
|
+
# @param [String] locale
|
1476
|
+
# Optional locale to use for translating report output to a local language.
|
1477
|
+
# Defaults to "en_US" if not specified.
|
1478
|
+
# @param [Fixnum] max_results
|
1479
|
+
# The maximum number of rows of report data to return.
|
1480
|
+
# @param [Fixnum] start_index
|
1481
|
+
# Index of the first row of report data to return.
|
1482
|
+
# @param [String] fields
|
1483
|
+
# Selector specifying which fields to include in a partial response.
|
1484
|
+
# @param [String] quota_user
|
1485
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1486
|
+
# characters.
|
1487
|
+
# @param [String] user_ip
|
1488
|
+
# Deprecated. Please use quotaUser instead.
|
1489
|
+
# @param [Google::Apis::RequestOptions] options
|
1490
|
+
# Request-specific options
|
1491
|
+
#
|
1492
|
+
# @yield [result, err] Result & error if block supplied
|
1493
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::GenerateReportResponse] parsed result object
|
1494
|
+
# @yieldparam err [StandardError] error object if request failed
|
1495
|
+
#
|
1496
|
+
# @return [Google::Apis::AdsenseV1_4::GenerateReportResponse]
|
1497
|
+
#
|
1498
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1499
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1500
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1501
|
+
def generate_saved_report(saved_report_id, locale: nil, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1502
|
+
command = make_simple_command(:get, 'reports/{savedReportId}', options)
|
1503
|
+
command.response_representation = Google::Apis::AdsenseV1_4::GenerateReportResponse::Representation
|
1504
|
+
command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse
|
1505
|
+
command.params['savedReportId'] = saved_report_id unless saved_report_id.nil?
|
1506
|
+
command.query['locale'] = locale unless locale.nil?
|
1507
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1508
|
+
command.query['startIndex'] = start_index unless start_index.nil?
|
1509
|
+
command.query['fields'] = fields unless fields.nil?
|
1510
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1511
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1512
|
+
execute_or_queue_command(command, &block)
|
1513
|
+
end
|
1514
|
+
|
1515
|
+
# List all saved reports in this AdSense account.
|
1516
|
+
# @param [Fixnum] max_results
|
1517
|
+
# The maximum number of saved reports to include in the response, used for
|
1518
|
+
# paging.
|
1519
|
+
# @param [String] page_token
|
1520
|
+
# A continuation token, used to page through saved reports. To retrieve the next
|
1521
|
+
# page, set this parameter to the value of "nextPageToken" from the previous
|
1522
|
+
# response.
|
1523
|
+
# @param [String] fields
|
1524
|
+
# Selector specifying which fields to include in a partial response.
|
1525
|
+
# @param [String] quota_user
|
1526
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1527
|
+
# characters.
|
1528
|
+
# @param [String] user_ip
|
1529
|
+
# Deprecated. Please use quotaUser instead.
|
1530
|
+
# @param [Google::Apis::RequestOptions] options
|
1531
|
+
# Request-specific options
|
1532
|
+
#
|
1533
|
+
# @yield [result, err] Result & error if block supplied
|
1534
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::SavedReports] parsed result object
|
1535
|
+
# @yieldparam err [StandardError] error object if request failed
|
1536
|
+
#
|
1537
|
+
# @return [Google::Apis::AdsenseV1_4::SavedReports]
|
1538
|
+
#
|
1539
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1540
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1541
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1542
|
+
def list_saved_reports(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1543
|
+
command = make_simple_command(:get, 'reports/saved', options)
|
1544
|
+
command.response_representation = Google::Apis::AdsenseV1_4::SavedReports::Representation
|
1545
|
+
command.response_class = Google::Apis::AdsenseV1_4::SavedReports
|
1546
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1547
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1548
|
+
command.query['fields'] = fields unless fields.nil?
|
1549
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1550
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1551
|
+
execute_or_queue_command(command, &block)
|
1552
|
+
end
|
1553
|
+
|
1554
|
+
# Get a specific saved ad style from the user's account.
|
1555
|
+
# @param [String] saved_ad_style_id
|
1556
|
+
# Saved ad style to retrieve.
|
1557
|
+
# @param [String] fields
|
1558
|
+
# Selector specifying which fields to include in a partial response.
|
1559
|
+
# @param [String] quota_user
|
1560
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1561
|
+
# characters.
|
1562
|
+
# @param [String] user_ip
|
1563
|
+
# Deprecated. Please use quotaUser instead.
|
1564
|
+
# @param [Google::Apis::RequestOptions] options
|
1565
|
+
# Request-specific options
|
1566
|
+
#
|
1567
|
+
# @yield [result, err] Result & error if block supplied
|
1568
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::SavedAdStyle] parsed result object
|
1569
|
+
# @yieldparam err [StandardError] error object if request failed
|
1570
|
+
#
|
1571
|
+
# @return [Google::Apis::AdsenseV1_4::SavedAdStyle]
|
1572
|
+
#
|
1573
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1574
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1575
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1576
|
+
def get_saved_ad_style(saved_ad_style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1577
|
+
command = make_simple_command(:get, 'savedadstyles/{savedAdStyleId}', options)
|
1578
|
+
command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyle::Representation
|
1579
|
+
command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyle
|
1580
|
+
command.params['savedAdStyleId'] = saved_ad_style_id unless saved_ad_style_id.nil?
|
1581
|
+
command.query['fields'] = fields unless fields.nil?
|
1582
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1583
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1584
|
+
execute_or_queue_command(command, &block)
|
1585
|
+
end
|
1586
|
+
|
1587
|
+
# List all saved ad styles in the user's account.
|
1588
|
+
# @param [Fixnum] max_results
|
1589
|
+
# The maximum number of saved ad styles to include in the response, used for
|
1590
|
+
# paging.
|
1591
|
+
# @param [String] page_token
|
1592
|
+
# A continuation token, used to page through saved ad styles. To retrieve the
|
1593
|
+
# next page, set this parameter to the value of "nextPageToken" from the
|
1594
|
+
# previous response.
|
1595
|
+
# @param [String] fields
|
1596
|
+
# Selector specifying which fields to include in a partial response.
|
1597
|
+
# @param [String] quota_user
|
1598
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1599
|
+
# characters.
|
1600
|
+
# @param [String] user_ip
|
1601
|
+
# Deprecated. Please use quotaUser instead.
|
1602
|
+
# @param [Google::Apis::RequestOptions] options
|
1603
|
+
# Request-specific options
|
1604
|
+
#
|
1605
|
+
# @yield [result, err] Result & error if block supplied
|
1606
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::SavedAdStyles] parsed result object
|
1607
|
+
# @yieldparam err [StandardError] error object if request failed
|
1608
|
+
#
|
1609
|
+
# @return [Google::Apis::AdsenseV1_4::SavedAdStyles]
|
1610
|
+
#
|
1611
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1612
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1613
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1614
|
+
def list_saved_ad_styles(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1615
|
+
command = make_simple_command(:get, 'savedadstyles', options)
|
1616
|
+
command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyles::Representation
|
1617
|
+
command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyles
|
1618
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1619
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1620
|
+
command.query['fields'] = fields unless fields.nil?
|
1621
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1622
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1623
|
+
execute_or_queue_command(command, &block)
|
1624
|
+
end
|
1625
|
+
|
1626
|
+
# List all URL channels in the specified ad client for this AdSense account.
|
1627
|
+
# @param [String] ad_client_id
|
1628
|
+
# Ad client for which to list URL channels.
|
1629
|
+
# @param [Fixnum] max_results
|
1630
|
+
# The maximum number of URL channels to include in the response, used for paging.
|
1631
|
+
# @param [String] page_token
|
1632
|
+
# A continuation token, used to page through URL channels. To retrieve the next
|
1633
|
+
# page, set this parameter to the value of "nextPageToken" from the previous
|
1634
|
+
# response.
|
1635
|
+
# @param [String] fields
|
1636
|
+
# Selector specifying which fields to include in a partial response.
|
1637
|
+
# @param [String] quota_user
|
1638
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1639
|
+
# characters.
|
1640
|
+
# @param [String] user_ip
|
1641
|
+
# Deprecated. Please use quotaUser instead.
|
1642
|
+
# @param [Google::Apis::RequestOptions] options
|
1643
|
+
# Request-specific options
|
1644
|
+
#
|
1645
|
+
# @yield [result, err] Result & error if block supplied
|
1646
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::UrlChannels] parsed result object
|
1647
|
+
# @yieldparam err [StandardError] error object if request failed
|
1648
|
+
#
|
1649
|
+
# @return [Google::Apis::AdsenseV1_4::UrlChannels]
|
1650
|
+
#
|
1651
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1652
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1653
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1654
|
+
def list_url_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1655
|
+
command = make_simple_command(:get, 'adclients/{adClientId}/urlchannels', options)
|
1656
|
+
command.response_representation = Google::Apis::AdsenseV1_4::UrlChannels::Representation
|
1657
|
+
command.response_class = Google::Apis::AdsenseV1_4::UrlChannels
|
1658
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1659
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1660
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1661
|
+
command.query['fields'] = fields unless fields.nil?
|
1662
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1663
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1664
|
+
execute_or_queue_command(command, &block)
|
1665
|
+
end
|
1666
|
+
|
1667
|
+
protected
|
1668
|
+
|
1669
|
+
def apply_command_defaults(command)
|
1670
|
+
command.query['key'] = key unless key.nil?
|
1671
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1672
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1673
|
+
end
|
1674
|
+
end
|
1675
|
+
end
|
1676
|
+
end
|
1677
|
+
end
|