google-apis-adsense_v2 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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_v2.rb +15 -0
- data/lib/google/apis/adsense_v2.rb +40 -0
- data/lib/google/apis/adsense_v2/classes.rb +1021 -0
- data/lib/google/apis/adsense_v2/gem_version.rb +28 -0
- data/lib/google/apis/adsense_v2/representations.rb +503 -0
- data/lib/google/apis/adsense_v2/service.rb +1064 -0
- metadata +76 -0
|
@@ -0,0 +1,1064 @@
|
|
|
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 AdsenseV2
|
|
23
|
+
# AdSense Management API
|
|
24
|
+
#
|
|
25
|
+
# The AdSense Management API allows publishers to access their inventory and run
|
|
26
|
+
# earnings and performance reports.
|
|
27
|
+
#
|
|
28
|
+
# @example
|
|
29
|
+
# require 'google/apis/adsense_v2'
|
|
30
|
+
#
|
|
31
|
+
# Adsense = Google::Apis::AdsenseV2 # Alias the module
|
|
32
|
+
# service = Adsense::AdsenseService.new
|
|
33
|
+
#
|
|
34
|
+
# @see http://code.google.com/apis/adsense/management/
|
|
35
|
+
class AdsenseService < Google::Apis::Core::BaseService
|
|
36
|
+
# @return [String]
|
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
|
39
|
+
attr_accessor :key
|
|
40
|
+
|
|
41
|
+
# @return [String]
|
|
42
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
43
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
44
|
+
attr_accessor :quota_user
|
|
45
|
+
|
|
46
|
+
def initialize
|
|
47
|
+
super('https://adsense.googleapis.com/', '',
|
|
48
|
+
client_name: 'google-apis-adsense_v2',
|
|
49
|
+
client_version: Google::Apis::AdsenseV2::GEM_VERSION)
|
|
50
|
+
@batch_path = 'batch'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Gets information about the selected AdSense account.
|
|
54
|
+
# @param [String] name
|
|
55
|
+
# Required. Account to get information about. Format: accounts/`account_id`
|
|
56
|
+
# @param [String] fields
|
|
57
|
+
# Selector specifying which fields to include in a partial response.
|
|
58
|
+
# @param [String] quota_user
|
|
59
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
60
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
61
|
+
# @param [Google::Apis::RequestOptions] options
|
|
62
|
+
# Request-specific options
|
|
63
|
+
#
|
|
64
|
+
# @yield [result, err] Result & error if block supplied
|
|
65
|
+
# @yieldparam result [Google::Apis::AdsenseV2::Account] parsed result object
|
|
66
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
67
|
+
#
|
|
68
|
+
# @return [Google::Apis::AdsenseV2::Account]
|
|
69
|
+
#
|
|
70
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
71
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
72
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
73
|
+
def get_account(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
74
|
+
command = make_simple_command(:get, 'v2/{+name}', options)
|
|
75
|
+
command.response_representation = Google::Apis::AdsenseV2::Account::Representation
|
|
76
|
+
command.response_class = Google::Apis::AdsenseV2::Account
|
|
77
|
+
command.params['name'] = name unless name.nil?
|
|
78
|
+
command.query['fields'] = fields unless fields.nil?
|
|
79
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
80
|
+
execute_or_queue_command(command, &block)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Lists all accounts available to this user.
|
|
84
|
+
# @param [Fixnum] page_size
|
|
85
|
+
# The maximum number of accounts to include in the response, used for paging. If
|
|
86
|
+
# unspecified, at most 10000 accounts will be returned. The maximum value is
|
|
87
|
+
# 10000; values above 10000 will be coerced to 10000.
|
|
88
|
+
# @param [String] page_token
|
|
89
|
+
# A page token, received from a previous `ListAccounts` call. Provide this to
|
|
90
|
+
# retrieve the subsequent page. When paginating, all other parameters provided
|
|
91
|
+
# to `ListAccounts` must match the call that provided the page token.
|
|
92
|
+
# @param [String] fields
|
|
93
|
+
# Selector specifying which fields to include in a partial response.
|
|
94
|
+
# @param [String] quota_user
|
|
95
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
96
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
97
|
+
# @param [Google::Apis::RequestOptions] options
|
|
98
|
+
# Request-specific options
|
|
99
|
+
#
|
|
100
|
+
# @yield [result, err] Result & error if block supplied
|
|
101
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ListAccountsResponse] parsed result object
|
|
102
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
103
|
+
#
|
|
104
|
+
# @return [Google::Apis::AdsenseV2::ListAccountsResponse]
|
|
105
|
+
#
|
|
106
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
107
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
108
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
109
|
+
def list_accounts(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
110
|
+
command = make_simple_command(:get, 'v2/accounts', options)
|
|
111
|
+
command.response_representation = Google::Apis::AdsenseV2::ListAccountsResponse::Representation
|
|
112
|
+
command.response_class = Google::Apis::AdsenseV2::ListAccountsResponse
|
|
113
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
114
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
115
|
+
command.query['fields'] = fields unless fields.nil?
|
|
116
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
117
|
+
execute_or_queue_command(command, &block)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Lists all accounts directly managed by the given AdSense account.
|
|
121
|
+
# @param [String] parent
|
|
122
|
+
# Required. The parent account, which owns the child accounts. Format: accounts/`
|
|
123
|
+
# account`
|
|
124
|
+
# @param [Fixnum] page_size
|
|
125
|
+
# The maximum number of accounts to include in the response, used for paging. If
|
|
126
|
+
# unspecified, at most 10000 accounts will be returned. The maximum value is
|
|
127
|
+
# 10000; values above 10000 will be coerced to 10000.
|
|
128
|
+
# @param [String] page_token
|
|
129
|
+
# A page token, received from a previous `ListAccounts` call. Provide this to
|
|
130
|
+
# retrieve the subsequent page. When paginating, all other parameters provided
|
|
131
|
+
# to `ListAccounts` must match the call that provided the page token.
|
|
132
|
+
# @param [String] fields
|
|
133
|
+
# Selector specifying which fields to include in a partial response.
|
|
134
|
+
# @param [String] quota_user
|
|
135
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
136
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
137
|
+
# @param [Google::Apis::RequestOptions] options
|
|
138
|
+
# Request-specific options
|
|
139
|
+
#
|
|
140
|
+
# @yield [result, err] Result & error if block supplied
|
|
141
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ListChildAccountsResponse] parsed result object
|
|
142
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
143
|
+
#
|
|
144
|
+
# @return [Google::Apis::AdsenseV2::ListChildAccountsResponse]
|
|
145
|
+
#
|
|
146
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
147
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
148
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
149
|
+
def list_account_child_accounts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
150
|
+
command = make_simple_command(:get, 'v2/{+parent}:listChildAccounts', options)
|
|
151
|
+
command.response_representation = Google::Apis::AdsenseV2::ListChildAccountsResponse::Representation
|
|
152
|
+
command.response_class = Google::Apis::AdsenseV2::ListChildAccountsResponse
|
|
153
|
+
command.params['parent'] = parent unless parent.nil?
|
|
154
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
155
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
156
|
+
command.query['fields'] = fields unless fields.nil?
|
|
157
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
158
|
+
execute_or_queue_command(command, &block)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Gets the AdSense code for a given ad client. This returns what was previously
|
|
162
|
+
# known as the 'auto ad code'. This is only supported for ad clients with a
|
|
163
|
+
# product_code of AFC. For more information, see [About the AdSense code](https:/
|
|
164
|
+
# /support.google.com/adsense/answer/9274634).
|
|
165
|
+
# @param [String] name
|
|
166
|
+
# Required. Name of the ad client for which to get the adcode. Format: accounts/`
|
|
167
|
+
# account`/adclients/`adclient`
|
|
168
|
+
# @param [String] fields
|
|
169
|
+
# Selector specifying which fields to include in a partial response.
|
|
170
|
+
# @param [String] quota_user
|
|
171
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
172
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
173
|
+
# @param [Google::Apis::RequestOptions] options
|
|
174
|
+
# Request-specific options
|
|
175
|
+
#
|
|
176
|
+
# @yield [result, err] Result & error if block supplied
|
|
177
|
+
# @yieldparam result [Google::Apis::AdsenseV2::AdClientAdCode] parsed result object
|
|
178
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
179
|
+
#
|
|
180
|
+
# @return [Google::Apis::AdsenseV2::AdClientAdCode]
|
|
181
|
+
#
|
|
182
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
183
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
184
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
185
|
+
def get_account_adclient_adcode(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
186
|
+
command = make_simple_command(:get, 'v2/{+name}/adcode', options)
|
|
187
|
+
command.response_representation = Google::Apis::AdsenseV2::AdClientAdCode::Representation
|
|
188
|
+
command.response_class = Google::Apis::AdsenseV2::AdClientAdCode
|
|
189
|
+
command.params['name'] = name unless name.nil?
|
|
190
|
+
command.query['fields'] = fields unless fields.nil?
|
|
191
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
192
|
+
execute_or_queue_command(command, &block)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Lists all the ad clients available in an account.
|
|
196
|
+
# @param [String] parent
|
|
197
|
+
# Required. The account which owns the collection of ad clients. Format:
|
|
198
|
+
# accounts/`account`
|
|
199
|
+
# @param [Fixnum] page_size
|
|
200
|
+
# The maximum number of ad clients to include in the response, used for paging.
|
|
201
|
+
# If unspecified, at most 10000 ad clients will be returned. The maximum value
|
|
202
|
+
# is 10000; values above 10000 will be coerced to 10000.
|
|
203
|
+
# @param [String] page_token
|
|
204
|
+
# A page token, received from a previous `ListAdClients` call. Provide this to
|
|
205
|
+
# retrieve the subsequent page. When paginating, all other parameters provided
|
|
206
|
+
# to `ListAdClients` must match the call that provided the page token.
|
|
207
|
+
# @param [String] fields
|
|
208
|
+
# Selector specifying which fields to include in a partial response.
|
|
209
|
+
# @param [String] quota_user
|
|
210
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
211
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
212
|
+
# @param [Google::Apis::RequestOptions] options
|
|
213
|
+
# Request-specific options
|
|
214
|
+
#
|
|
215
|
+
# @yield [result, err] Result & error if block supplied
|
|
216
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ListAdClientsResponse] parsed result object
|
|
217
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
218
|
+
#
|
|
219
|
+
# @return [Google::Apis::AdsenseV2::ListAdClientsResponse]
|
|
220
|
+
#
|
|
221
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
222
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
223
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
224
|
+
def list_account_adclients(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
225
|
+
command = make_simple_command(:get, 'v2/{+parent}/adclients', options)
|
|
226
|
+
command.response_representation = Google::Apis::AdsenseV2::ListAdClientsResponse::Representation
|
|
227
|
+
command.response_class = Google::Apis::AdsenseV2::ListAdClientsResponse
|
|
228
|
+
command.params['parent'] = parent unless parent.nil?
|
|
229
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
230
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
231
|
+
command.query['fields'] = fields unless fields.nil?
|
|
232
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
233
|
+
execute_or_queue_command(command, &block)
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Gets an ad unit from a specified account and ad client.
|
|
237
|
+
# @param [String] name
|
|
238
|
+
# Required. AdUnit to get information about. Format: accounts/`account_id`/
|
|
239
|
+
# adclient/`adclient_id`/adunit/`adunit_id`
|
|
240
|
+
# @param [String] fields
|
|
241
|
+
# Selector specifying which fields to include in a partial response.
|
|
242
|
+
# @param [String] quota_user
|
|
243
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
244
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
245
|
+
# @param [Google::Apis::RequestOptions] options
|
|
246
|
+
# Request-specific options
|
|
247
|
+
#
|
|
248
|
+
# @yield [result, err] Result & error if block supplied
|
|
249
|
+
# @yieldparam result [Google::Apis::AdsenseV2::AdUnit] parsed result object
|
|
250
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
251
|
+
#
|
|
252
|
+
# @return [Google::Apis::AdsenseV2::AdUnit]
|
|
253
|
+
#
|
|
254
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
255
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
256
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
257
|
+
def get_account_adclient_adunit(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
258
|
+
command = make_simple_command(:get, 'v2/{+name}', options)
|
|
259
|
+
command.response_representation = Google::Apis::AdsenseV2::AdUnit::Representation
|
|
260
|
+
command.response_class = Google::Apis::AdsenseV2::AdUnit
|
|
261
|
+
command.params['name'] = name unless name.nil?
|
|
262
|
+
command.query['fields'] = fields unless fields.nil?
|
|
263
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
264
|
+
execute_or_queue_command(command, &block)
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Gets the AdSense code for a given ad unit.
|
|
268
|
+
# @param [String] name
|
|
269
|
+
# Required. Name of the adunit for which to get the adcode. Format: accounts/`
|
|
270
|
+
# account`/adclients/`adclient`/adunits/`adunit`
|
|
271
|
+
# @param [String] fields
|
|
272
|
+
# Selector specifying which fields to include in a partial response.
|
|
273
|
+
# @param [String] quota_user
|
|
274
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
275
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
276
|
+
# @param [Google::Apis::RequestOptions] options
|
|
277
|
+
# Request-specific options
|
|
278
|
+
#
|
|
279
|
+
# @yield [result, err] Result & error if block supplied
|
|
280
|
+
# @yieldparam result [Google::Apis::AdsenseV2::AdUnitAdCode] parsed result object
|
|
281
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
282
|
+
#
|
|
283
|
+
# @return [Google::Apis::AdsenseV2::AdUnitAdCode]
|
|
284
|
+
#
|
|
285
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
286
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
287
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
288
|
+
def get_account_adclient_adunit_adcode(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
289
|
+
command = make_simple_command(:get, 'v2/{+name}/adcode', options)
|
|
290
|
+
command.response_representation = Google::Apis::AdsenseV2::AdUnitAdCode::Representation
|
|
291
|
+
command.response_class = Google::Apis::AdsenseV2::AdUnitAdCode
|
|
292
|
+
command.params['name'] = name unless name.nil?
|
|
293
|
+
command.query['fields'] = fields unless fields.nil?
|
|
294
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
295
|
+
execute_or_queue_command(command, &block)
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Lists all ad units under a specified account and ad client.
|
|
299
|
+
# @param [String] parent
|
|
300
|
+
# Required. The ad client which owns the collection of ad units. Format:
|
|
301
|
+
# accounts/`account`/adclients/`adclient`
|
|
302
|
+
# @param [Fixnum] page_size
|
|
303
|
+
# The maximum number of ad units to include in the response, used for paging. If
|
|
304
|
+
# unspecified, at most 10000 ad units will be returned. The maximum value is
|
|
305
|
+
# 10000; values above 10000 will be coerced to 10000.
|
|
306
|
+
# @param [String] page_token
|
|
307
|
+
# A page token, received from a previous `ListAdUnits` call. Provide this to
|
|
308
|
+
# retrieve the subsequent page. When paginating, all other parameters provided
|
|
309
|
+
# to `ListAdUnits` must match the call that provided the page token.
|
|
310
|
+
# @param [String] fields
|
|
311
|
+
# Selector specifying which fields to include in a partial response.
|
|
312
|
+
# @param [String] quota_user
|
|
313
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
314
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
315
|
+
# @param [Google::Apis::RequestOptions] options
|
|
316
|
+
# Request-specific options
|
|
317
|
+
#
|
|
318
|
+
# @yield [result, err] Result & error if block supplied
|
|
319
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ListAdUnitsResponse] parsed result object
|
|
320
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
321
|
+
#
|
|
322
|
+
# @return [Google::Apis::AdsenseV2::ListAdUnitsResponse]
|
|
323
|
+
#
|
|
324
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
325
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
326
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
327
|
+
def list_account_adclient_adunits(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
328
|
+
command = make_simple_command(:get, 'v2/{+parent}/adunits', options)
|
|
329
|
+
command.response_representation = Google::Apis::AdsenseV2::ListAdUnitsResponse::Representation
|
|
330
|
+
command.response_class = Google::Apis::AdsenseV2::ListAdUnitsResponse
|
|
331
|
+
command.params['parent'] = parent unless parent.nil?
|
|
332
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
333
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
334
|
+
command.query['fields'] = fields unless fields.nil?
|
|
335
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
336
|
+
execute_or_queue_command(command, &block)
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# Lists all the custom channels available for an ad unit.
|
|
340
|
+
# @param [String] parent
|
|
341
|
+
# Required. The ad unit which owns the collection of custom channels. Format:
|
|
342
|
+
# accounts/`account`/adclients/`adclient`/adunits/`adunit`
|
|
343
|
+
# @param [Fixnum] page_size
|
|
344
|
+
# The maximum number of custom channels to include in the response, used for
|
|
345
|
+
# paging. If unspecified, at most 10000 custom channels will be returned. The
|
|
346
|
+
# maximum value is 10000; values above 10000 will be coerced to 10000.
|
|
347
|
+
# @param [String] page_token
|
|
348
|
+
# A page token, received from a previous `ListLinkedCustomChannels` call.
|
|
349
|
+
# Provide this to retrieve the subsequent page. When paginating, all other
|
|
350
|
+
# parameters provided to `ListLinkedCustomChannels` must match the call that
|
|
351
|
+
# provided the page token.
|
|
352
|
+
# @param [String] fields
|
|
353
|
+
# Selector specifying which fields to include in a partial response.
|
|
354
|
+
# @param [String] quota_user
|
|
355
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
356
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
357
|
+
# @param [Google::Apis::RequestOptions] options
|
|
358
|
+
# Request-specific options
|
|
359
|
+
#
|
|
360
|
+
# @yield [result, err] Result & error if block supplied
|
|
361
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ListLinkedCustomChannelsResponse] parsed result object
|
|
362
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
363
|
+
#
|
|
364
|
+
# @return [Google::Apis::AdsenseV2::ListLinkedCustomChannelsResponse]
|
|
365
|
+
#
|
|
366
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
367
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
368
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
369
|
+
def list_account_adclient_adunit_linked_custom_channels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
370
|
+
command = make_simple_command(:get, 'v2/{+parent}:listLinkedCustomChannels', options)
|
|
371
|
+
command.response_representation = Google::Apis::AdsenseV2::ListLinkedCustomChannelsResponse::Representation
|
|
372
|
+
command.response_class = Google::Apis::AdsenseV2::ListLinkedCustomChannelsResponse
|
|
373
|
+
command.params['parent'] = parent unless parent.nil?
|
|
374
|
+
command.query['pageSize'] = page_size unless page_size.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
|
+
execute_or_queue_command(command, &block)
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
# Gets information about the selected custom channel.
|
|
382
|
+
# @param [String] name
|
|
383
|
+
# Required. Name of the custom channel. Format: accounts/`account`/adclients/`
|
|
384
|
+
# adclient`/customchannels/`customchannel`
|
|
385
|
+
# @param [String] fields
|
|
386
|
+
# Selector specifying which fields to include in a partial response.
|
|
387
|
+
# @param [String] quota_user
|
|
388
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
389
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
390
|
+
# @param [Google::Apis::RequestOptions] options
|
|
391
|
+
# Request-specific options
|
|
392
|
+
#
|
|
393
|
+
# @yield [result, err] Result & error if block supplied
|
|
394
|
+
# @yieldparam result [Google::Apis::AdsenseV2::CustomChannel] parsed result object
|
|
395
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
396
|
+
#
|
|
397
|
+
# @return [Google::Apis::AdsenseV2::CustomChannel]
|
|
398
|
+
#
|
|
399
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
400
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
401
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
402
|
+
def get_account_adclient_customchannel(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
403
|
+
command = make_simple_command(:get, 'v2/{+name}', options)
|
|
404
|
+
command.response_representation = Google::Apis::AdsenseV2::CustomChannel::Representation
|
|
405
|
+
command.response_class = Google::Apis::AdsenseV2::CustomChannel
|
|
406
|
+
command.params['name'] = name unless name.nil?
|
|
407
|
+
command.query['fields'] = fields unless fields.nil?
|
|
408
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
409
|
+
execute_or_queue_command(command, &block)
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
# Lists all the custom channels available in an ad client.
|
|
413
|
+
# @param [String] parent
|
|
414
|
+
# Required. The ad client which owns the collection of custom channels. Format:
|
|
415
|
+
# accounts/`account`/adclients/`adclient`
|
|
416
|
+
# @param [Fixnum] page_size
|
|
417
|
+
# The maximum number of custom channels to include in the response, used for
|
|
418
|
+
# paging. If unspecified, at most 10000 custom channels will be returned. The
|
|
419
|
+
# maximum value is 10000; values above 10000 will be coerced to 10000.
|
|
420
|
+
# @param [String] page_token
|
|
421
|
+
# A page token, received from a previous `ListCustomChannels` call. Provide this
|
|
422
|
+
# to retrieve the subsequent page. When paginating, all other parameters
|
|
423
|
+
# provided to `ListCustomChannels` must match the call that provided the page
|
|
424
|
+
# token.
|
|
425
|
+
# @param [String] fields
|
|
426
|
+
# Selector specifying which fields to include in a partial response.
|
|
427
|
+
# @param [String] quota_user
|
|
428
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
429
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
430
|
+
# @param [Google::Apis::RequestOptions] options
|
|
431
|
+
# Request-specific options
|
|
432
|
+
#
|
|
433
|
+
# @yield [result, err] Result & error if block supplied
|
|
434
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ListCustomChannelsResponse] parsed result object
|
|
435
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
436
|
+
#
|
|
437
|
+
# @return [Google::Apis::AdsenseV2::ListCustomChannelsResponse]
|
|
438
|
+
#
|
|
439
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
440
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
441
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
442
|
+
def list_account_adclient_customchannels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
443
|
+
command = make_simple_command(:get, 'v2/{+parent}/customchannels', options)
|
|
444
|
+
command.response_representation = Google::Apis::AdsenseV2::ListCustomChannelsResponse::Representation
|
|
445
|
+
command.response_class = Google::Apis::AdsenseV2::ListCustomChannelsResponse
|
|
446
|
+
command.params['parent'] = parent unless parent.nil?
|
|
447
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
448
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
449
|
+
command.query['fields'] = fields unless fields.nil?
|
|
450
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
451
|
+
execute_or_queue_command(command, &block)
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
# Lists all the ad units available for a custom channel.
|
|
455
|
+
# @param [String] parent
|
|
456
|
+
# Required. The custom channel which owns the collection of ad units. Format:
|
|
457
|
+
# accounts/`account`/adclients/`adclient`/customchannels/`customchannel`
|
|
458
|
+
# @param [Fixnum] page_size
|
|
459
|
+
# The maximum number of ad units to include in the response, used for paging. If
|
|
460
|
+
# unspecified, at most 10000 ad units will be returned. The maximum value is
|
|
461
|
+
# 10000; values above 10000 will be coerced to 10000.
|
|
462
|
+
# @param [String] page_token
|
|
463
|
+
# A page token, received from a previous `ListLinkedAdUnits` call. Provide this
|
|
464
|
+
# to retrieve the subsequent page. When paginating, all other parameters
|
|
465
|
+
# provided to `ListLinkedAdUnits` must match the call that provided the page
|
|
466
|
+
# token.
|
|
467
|
+
# @param [String] fields
|
|
468
|
+
# Selector specifying which fields to include in a partial response.
|
|
469
|
+
# @param [String] quota_user
|
|
470
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
471
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
472
|
+
# @param [Google::Apis::RequestOptions] options
|
|
473
|
+
# Request-specific options
|
|
474
|
+
#
|
|
475
|
+
# @yield [result, err] Result & error if block supplied
|
|
476
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ListLinkedAdUnitsResponse] parsed result object
|
|
477
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
478
|
+
#
|
|
479
|
+
# @return [Google::Apis::AdsenseV2::ListLinkedAdUnitsResponse]
|
|
480
|
+
#
|
|
481
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
482
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
483
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
484
|
+
def list_account_adclient_customchannel_linked_ad_units(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
485
|
+
command = make_simple_command(:get, 'v2/{+parent}:listLinkedAdUnits', options)
|
|
486
|
+
command.response_representation = Google::Apis::AdsenseV2::ListLinkedAdUnitsResponse::Representation
|
|
487
|
+
command.response_class = Google::Apis::AdsenseV2::ListLinkedAdUnitsResponse
|
|
488
|
+
command.params['parent'] = parent unless parent.nil?
|
|
489
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
490
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
491
|
+
command.query['fields'] = fields unless fields.nil?
|
|
492
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
493
|
+
execute_or_queue_command(command, &block)
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
# Lists active url channels.
|
|
497
|
+
# @param [String] parent
|
|
498
|
+
# Required. The ad client which owns the collection of url channels. Format:
|
|
499
|
+
# accounts/`account`/adclients/`adclient`
|
|
500
|
+
# @param [Fixnum] page_size
|
|
501
|
+
# The maximum number of url channels to include in the response, used for paging.
|
|
502
|
+
# If unspecified, at most 10000 url channels will be returned. The maximum
|
|
503
|
+
# value is 10000; values above 10000 will be coerced to 10000.
|
|
504
|
+
# @param [String] page_token
|
|
505
|
+
# A page token, received from a previous `ListUrlChannels` call. Provide this to
|
|
506
|
+
# retrieve the subsequent page. When paginating, all other parameters provided
|
|
507
|
+
# to `ListUrlChannels` must match the call that provided the page token.
|
|
508
|
+
# @param [String] fields
|
|
509
|
+
# Selector specifying which fields to include in a partial response.
|
|
510
|
+
# @param [String] quota_user
|
|
511
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
512
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
513
|
+
# @param [Google::Apis::RequestOptions] options
|
|
514
|
+
# Request-specific options
|
|
515
|
+
#
|
|
516
|
+
# @yield [result, err] Result & error if block supplied
|
|
517
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ListUrlChannelsResponse] parsed result object
|
|
518
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
519
|
+
#
|
|
520
|
+
# @return [Google::Apis::AdsenseV2::ListUrlChannelsResponse]
|
|
521
|
+
#
|
|
522
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
523
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
524
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
525
|
+
def list_account_adclient_urlchannels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
526
|
+
command = make_simple_command(:get, 'v2/{+parent}/urlchannels', options)
|
|
527
|
+
command.response_representation = Google::Apis::AdsenseV2::ListUrlChannelsResponse::Representation
|
|
528
|
+
command.response_class = Google::Apis::AdsenseV2::ListUrlChannelsResponse
|
|
529
|
+
command.params['parent'] = parent unless parent.nil?
|
|
530
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
531
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
532
|
+
command.query['fields'] = fields unless fields.nil?
|
|
533
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
534
|
+
execute_or_queue_command(command, &block)
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
# Lists all the alerts available in an account.
|
|
538
|
+
# @param [String] parent
|
|
539
|
+
# Required. The account which owns the collection of alerts. Format: accounts/`
|
|
540
|
+
# account`
|
|
541
|
+
# @param [String] language_code
|
|
542
|
+
# The language to use for translating alert messages. If unspecified, this
|
|
543
|
+
# defaults to the user's display language. If the given language is not
|
|
544
|
+
# supported, alerts will be returned in English. The language is specified as an
|
|
545
|
+
# [IETF BCP-47 language code](https://en.wikipedia.org/wiki/IETF_language_tag).
|
|
546
|
+
# @param [String] fields
|
|
547
|
+
# Selector specifying which fields to include in a partial response.
|
|
548
|
+
# @param [String] quota_user
|
|
549
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
550
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
551
|
+
# @param [Google::Apis::RequestOptions] options
|
|
552
|
+
# Request-specific options
|
|
553
|
+
#
|
|
554
|
+
# @yield [result, err] Result & error if block supplied
|
|
555
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ListAlertsResponse] parsed result object
|
|
556
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
557
|
+
#
|
|
558
|
+
# @return [Google::Apis::AdsenseV2::ListAlertsResponse]
|
|
559
|
+
#
|
|
560
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
561
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
562
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
563
|
+
def list_account_alerts(parent, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
564
|
+
command = make_simple_command(:get, 'v2/{+parent}/alerts', options)
|
|
565
|
+
command.response_representation = Google::Apis::AdsenseV2::ListAlertsResponse::Representation
|
|
566
|
+
command.response_class = Google::Apis::AdsenseV2::ListAlertsResponse
|
|
567
|
+
command.params['parent'] = parent unless parent.nil?
|
|
568
|
+
command.query['languageCode'] = language_code unless language_code.nil?
|
|
569
|
+
command.query['fields'] = fields unless fields.nil?
|
|
570
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
571
|
+
execute_or_queue_command(command, &block)
|
|
572
|
+
end
|
|
573
|
+
|
|
574
|
+
# Lists all the payments available for an account.
|
|
575
|
+
# @param [String] parent
|
|
576
|
+
# Required. The account which owns the collection of payments. Format: accounts/`
|
|
577
|
+
# account`
|
|
578
|
+
# @param [String] fields
|
|
579
|
+
# Selector specifying which fields to include in a partial response.
|
|
580
|
+
# @param [String] quota_user
|
|
581
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
582
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
583
|
+
# @param [Google::Apis::RequestOptions] options
|
|
584
|
+
# Request-specific options
|
|
585
|
+
#
|
|
586
|
+
# @yield [result, err] Result & error if block supplied
|
|
587
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ListPaymentsResponse] parsed result object
|
|
588
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
589
|
+
#
|
|
590
|
+
# @return [Google::Apis::AdsenseV2::ListPaymentsResponse]
|
|
591
|
+
#
|
|
592
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
593
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
594
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
595
|
+
def list_account_payments(parent, fields: nil, quota_user: nil, options: nil, &block)
|
|
596
|
+
command = make_simple_command(:get, 'v2/{+parent}/payments', options)
|
|
597
|
+
command.response_representation = Google::Apis::AdsenseV2::ListPaymentsResponse::Representation
|
|
598
|
+
command.response_class = Google::Apis::AdsenseV2::ListPaymentsResponse
|
|
599
|
+
command.params['parent'] = parent unless parent.nil?
|
|
600
|
+
command.query['fields'] = fields unless fields.nil?
|
|
601
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
602
|
+
execute_or_queue_command(command, &block)
|
|
603
|
+
end
|
|
604
|
+
|
|
605
|
+
# Generates an ad hoc report.
|
|
606
|
+
# @param [String] account
|
|
607
|
+
# Required. The account which owns the collection of reports. Format: accounts/`
|
|
608
|
+
# account`
|
|
609
|
+
# @param [String] currency_code
|
|
610
|
+
# The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) to use
|
|
611
|
+
# when reporting on monetary metrics. Defaults to the account's currency if not
|
|
612
|
+
# set.
|
|
613
|
+
# @param [String] date_range
|
|
614
|
+
# Date range of the report, if unset the range will be considered CUSTOM.
|
|
615
|
+
# @param [Array<String>, String] dimensions
|
|
616
|
+
# Dimensions to base the report on.
|
|
617
|
+
# @param [Fixnum] end_date_day
|
|
618
|
+
# Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
|
|
619
|
+
# specify a year by itself or a year and month where the day isn't significant.
|
|
620
|
+
# @param [Fixnum] end_date_month
|
|
621
|
+
# Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
|
|
622
|
+
# and day.
|
|
623
|
+
# @param [Fixnum] end_date_year
|
|
624
|
+
# Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
|
|
625
|
+
# year.
|
|
626
|
+
# @param [Array<String>, String] filters
|
|
627
|
+
# Filters to be run on the report.
|
|
628
|
+
# @param [String] language_code
|
|
629
|
+
# The language to use for translating report output. If unspecified, this
|
|
630
|
+
# defaults to English ("en"). If the given language is not supported, report
|
|
631
|
+
# output will be returned in English. The language is specified as an [IETF BCP-
|
|
632
|
+
# 47 language code](https://en.wikipedia.org/wiki/IETF_language_tag).
|
|
633
|
+
# @param [Fixnum] limit
|
|
634
|
+
# The maximum number of rows of report data to return. Reports producing more
|
|
635
|
+
# rows than the requested limit will be truncated. If unset, this defaults to
|
|
636
|
+
# 100,000 rows for `Reports.GenerateReport` and 1,000,000 rows for `Reports.
|
|
637
|
+
# GenerateCsvReport`, which are also the maximum values permitted here. Report
|
|
638
|
+
# truncation can be identified (for `Reports.GenerateReport` only) by comparing
|
|
639
|
+
# the number of rows returned to the value returned in `total_matched_rows`.
|
|
640
|
+
# @param [Array<String>, String] metrics
|
|
641
|
+
# Required. Reporting metrics.
|
|
642
|
+
# @param [Array<String>, String] order_by
|
|
643
|
+
# The name of a dimension or metric to sort the resulting report on, can be
|
|
644
|
+
# prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is
|
|
645
|
+
# specified, the column is sorted ascending.
|
|
646
|
+
# @param [String] reporting_time_zone
|
|
647
|
+
# Timezone in which to generate the report. If unspecified, this defaults to the
|
|
648
|
+
# account timezone. For more information, see [changing the time zone of your
|
|
649
|
+
# reports](https://support.google.com/adsense/answer/9830725).
|
|
650
|
+
# @param [Fixnum] start_date_day
|
|
651
|
+
# Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
|
|
652
|
+
# specify a year by itself or a year and month where the day isn't significant.
|
|
653
|
+
# @param [Fixnum] start_date_month
|
|
654
|
+
# Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
|
|
655
|
+
# and day.
|
|
656
|
+
# @param [Fixnum] start_date_year
|
|
657
|
+
# Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
|
|
658
|
+
# year.
|
|
659
|
+
# @param [String] fields
|
|
660
|
+
# Selector specifying which fields to include in a partial response.
|
|
661
|
+
# @param [String] quota_user
|
|
662
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
663
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
664
|
+
# @param [Google::Apis::RequestOptions] options
|
|
665
|
+
# Request-specific options
|
|
666
|
+
#
|
|
667
|
+
# @yield [result, err] Result & error if block supplied
|
|
668
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ReportResult] parsed result object
|
|
669
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
670
|
+
#
|
|
671
|
+
# @return [Google::Apis::AdsenseV2::ReportResult]
|
|
672
|
+
#
|
|
673
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
674
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
675
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
676
|
+
def generate_account_report(account, currency_code: nil, date_range: nil, dimensions: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, filters: nil, language_code: nil, limit: nil, metrics: nil, order_by: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
677
|
+
command = make_simple_command(:get, 'v2/{+account}/reports:generate', options)
|
|
678
|
+
command.response_representation = Google::Apis::AdsenseV2::ReportResult::Representation
|
|
679
|
+
command.response_class = Google::Apis::AdsenseV2::ReportResult
|
|
680
|
+
command.params['account'] = account unless account.nil?
|
|
681
|
+
command.query['currencyCode'] = currency_code unless currency_code.nil?
|
|
682
|
+
command.query['dateRange'] = date_range unless date_range.nil?
|
|
683
|
+
command.query['dimensions'] = dimensions unless dimensions.nil?
|
|
684
|
+
command.query['endDate.day'] = end_date_day unless end_date_day.nil?
|
|
685
|
+
command.query['endDate.month'] = end_date_month unless end_date_month.nil?
|
|
686
|
+
command.query['endDate.year'] = end_date_year unless end_date_year.nil?
|
|
687
|
+
command.query['filters'] = filters unless filters.nil?
|
|
688
|
+
command.query['languageCode'] = language_code unless language_code.nil?
|
|
689
|
+
command.query['limit'] = limit unless limit.nil?
|
|
690
|
+
command.query['metrics'] = metrics unless metrics.nil?
|
|
691
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
|
692
|
+
command.query['reportingTimeZone'] = reporting_time_zone unless reporting_time_zone.nil?
|
|
693
|
+
command.query['startDate.day'] = start_date_day unless start_date_day.nil?
|
|
694
|
+
command.query['startDate.month'] = start_date_month unless start_date_month.nil?
|
|
695
|
+
command.query['startDate.year'] = start_date_year unless start_date_year.nil?
|
|
696
|
+
command.query['fields'] = fields unless fields.nil?
|
|
697
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
698
|
+
execute_or_queue_command(command, &block)
|
|
699
|
+
end
|
|
700
|
+
|
|
701
|
+
# Generates a csv formatted ad hoc report.
|
|
702
|
+
# @param [String] account
|
|
703
|
+
# Required. The account which owns the collection of reports. Format: accounts/`
|
|
704
|
+
# account`
|
|
705
|
+
# @param [String] currency_code
|
|
706
|
+
# The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) to use
|
|
707
|
+
# when reporting on monetary metrics. Defaults to the account's currency if not
|
|
708
|
+
# set.
|
|
709
|
+
# @param [String] date_range
|
|
710
|
+
# Date range of the report, if unset the range will be considered CUSTOM.
|
|
711
|
+
# @param [Array<String>, String] dimensions
|
|
712
|
+
# Dimensions to base the report on.
|
|
713
|
+
# @param [Fixnum] end_date_day
|
|
714
|
+
# Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
|
|
715
|
+
# specify a year by itself or a year and month where the day isn't significant.
|
|
716
|
+
# @param [Fixnum] end_date_month
|
|
717
|
+
# Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
|
|
718
|
+
# and day.
|
|
719
|
+
# @param [Fixnum] end_date_year
|
|
720
|
+
# Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
|
|
721
|
+
# year.
|
|
722
|
+
# @param [Array<String>, String] filters
|
|
723
|
+
# Filters to be run on the report.
|
|
724
|
+
# @param [String] language_code
|
|
725
|
+
# The language to use for translating report output. If unspecified, this
|
|
726
|
+
# defaults to English ("en"). If the given language is not supported, report
|
|
727
|
+
# output will be returned in English. The language is specified as an [IETF BCP-
|
|
728
|
+
# 47 language code](https://en.wikipedia.org/wiki/IETF_language_tag).
|
|
729
|
+
# @param [Fixnum] limit
|
|
730
|
+
# The maximum number of rows of report data to return. Reports producing more
|
|
731
|
+
# rows than the requested limit will be truncated. If unset, this defaults to
|
|
732
|
+
# 100,000 rows for `Reports.GenerateReport` and 1,000,000 rows for `Reports.
|
|
733
|
+
# GenerateCsvReport`, which are also the maximum values permitted here. Report
|
|
734
|
+
# truncation can be identified (for `Reports.GenerateReport` only) by comparing
|
|
735
|
+
# the number of rows returned to the value returned in `total_matched_rows`.
|
|
736
|
+
# @param [Array<String>, String] metrics
|
|
737
|
+
# Required. Reporting metrics.
|
|
738
|
+
# @param [Array<String>, String] order_by
|
|
739
|
+
# The name of a dimension or metric to sort the resulting report on, can be
|
|
740
|
+
# prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is
|
|
741
|
+
# specified, the column is sorted ascending.
|
|
742
|
+
# @param [String] reporting_time_zone
|
|
743
|
+
# Timezone in which to generate the report. If unspecified, this defaults to the
|
|
744
|
+
# account timezone. For more information, see [changing the time zone of your
|
|
745
|
+
# reports](https://support.google.com/adsense/answer/9830725).
|
|
746
|
+
# @param [Fixnum] start_date_day
|
|
747
|
+
# Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
|
|
748
|
+
# specify a year by itself or a year and month where the day isn't significant.
|
|
749
|
+
# @param [Fixnum] start_date_month
|
|
750
|
+
# Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
|
|
751
|
+
# and day.
|
|
752
|
+
# @param [Fixnum] start_date_year
|
|
753
|
+
# Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
|
|
754
|
+
# year.
|
|
755
|
+
# @param [String] fields
|
|
756
|
+
# Selector specifying which fields to include in a partial response.
|
|
757
|
+
# @param [String] quota_user
|
|
758
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
759
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
760
|
+
# @param [Google::Apis::RequestOptions] options
|
|
761
|
+
# Request-specific options
|
|
762
|
+
#
|
|
763
|
+
# @yield [result, err] Result & error if block supplied
|
|
764
|
+
# @yieldparam result [Google::Apis::AdsenseV2::HttpBody] parsed result object
|
|
765
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
766
|
+
#
|
|
767
|
+
# @return [Google::Apis::AdsenseV2::HttpBody]
|
|
768
|
+
#
|
|
769
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
770
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
771
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
772
|
+
def generate_account_report_csv(account, currency_code: nil, date_range: nil, dimensions: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, filters: nil, language_code: nil, limit: nil, metrics: nil, order_by: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
773
|
+
command = make_simple_command(:get, 'v2/{+account}/reports:generateCsv', options)
|
|
774
|
+
command.response_representation = Google::Apis::AdsenseV2::HttpBody::Representation
|
|
775
|
+
command.response_class = Google::Apis::AdsenseV2::HttpBody
|
|
776
|
+
command.params['account'] = account unless account.nil?
|
|
777
|
+
command.query['currencyCode'] = currency_code unless currency_code.nil?
|
|
778
|
+
command.query['dateRange'] = date_range unless date_range.nil?
|
|
779
|
+
command.query['dimensions'] = dimensions unless dimensions.nil?
|
|
780
|
+
command.query['endDate.day'] = end_date_day unless end_date_day.nil?
|
|
781
|
+
command.query['endDate.month'] = end_date_month unless end_date_month.nil?
|
|
782
|
+
command.query['endDate.year'] = end_date_year unless end_date_year.nil?
|
|
783
|
+
command.query['filters'] = filters unless filters.nil?
|
|
784
|
+
command.query['languageCode'] = language_code unless language_code.nil?
|
|
785
|
+
command.query['limit'] = limit unless limit.nil?
|
|
786
|
+
command.query['metrics'] = metrics unless metrics.nil?
|
|
787
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
|
788
|
+
command.query['reportingTimeZone'] = reporting_time_zone unless reporting_time_zone.nil?
|
|
789
|
+
command.query['startDate.day'] = start_date_day unless start_date_day.nil?
|
|
790
|
+
command.query['startDate.month'] = start_date_month unless start_date_month.nil?
|
|
791
|
+
command.query['startDate.year'] = start_date_year unless start_date_year.nil?
|
|
792
|
+
command.query['fields'] = fields unless fields.nil?
|
|
793
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
794
|
+
execute_or_queue_command(command, &block)
|
|
795
|
+
end
|
|
796
|
+
|
|
797
|
+
# Generates a saved report.
|
|
798
|
+
# @param [String] name
|
|
799
|
+
# Required. Name of the saved report. Format: accounts/`account`/reports/`report`
|
|
800
|
+
# @param [String] currency_code
|
|
801
|
+
# The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) to use
|
|
802
|
+
# when reporting on monetary metrics. Defaults to the account's currency if not
|
|
803
|
+
# set.
|
|
804
|
+
# @param [String] date_range
|
|
805
|
+
# Date range of the report, if unset the range will be considered CUSTOM.
|
|
806
|
+
# @param [Fixnum] end_date_day
|
|
807
|
+
# Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
|
|
808
|
+
# specify a year by itself or a year and month where the day isn't significant.
|
|
809
|
+
# @param [Fixnum] end_date_month
|
|
810
|
+
# Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
|
|
811
|
+
# and day.
|
|
812
|
+
# @param [Fixnum] end_date_year
|
|
813
|
+
# Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
|
|
814
|
+
# year.
|
|
815
|
+
# @param [String] language_code
|
|
816
|
+
# The language to use for translating report output. If unspecified, this
|
|
817
|
+
# defaults to English ("en"). If the given language is not supported, report
|
|
818
|
+
# output will be returned in English. The language is specified as an [IETF BCP-
|
|
819
|
+
# 47 language code](https://en.wikipedia.org/wiki/IETF_language_tag).
|
|
820
|
+
# @param [String] reporting_time_zone
|
|
821
|
+
# Timezone in which to generate the report. If unspecified, this defaults to the
|
|
822
|
+
# account timezone. For more information, see [changing the time zone of your
|
|
823
|
+
# reports](https://support.google.com/adsense/answer/9830725).
|
|
824
|
+
# @param [Fixnum] start_date_day
|
|
825
|
+
# Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
|
|
826
|
+
# specify a year by itself or a year and month where the day isn't significant.
|
|
827
|
+
# @param [Fixnum] start_date_month
|
|
828
|
+
# Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
|
|
829
|
+
# and day.
|
|
830
|
+
# @param [Fixnum] start_date_year
|
|
831
|
+
# Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
|
|
832
|
+
# year.
|
|
833
|
+
# @param [String] fields
|
|
834
|
+
# Selector specifying which fields to include in a partial response.
|
|
835
|
+
# @param [String] quota_user
|
|
836
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
837
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
838
|
+
# @param [Google::Apis::RequestOptions] options
|
|
839
|
+
# Request-specific options
|
|
840
|
+
#
|
|
841
|
+
# @yield [result, err] Result & error if block supplied
|
|
842
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ReportResult] parsed result object
|
|
843
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
844
|
+
#
|
|
845
|
+
# @return [Google::Apis::AdsenseV2::ReportResult]
|
|
846
|
+
#
|
|
847
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
848
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
849
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
850
|
+
def generate_account_report_saved(name, currency_code: nil, date_range: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, language_code: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
851
|
+
command = make_simple_command(:get, 'v2/{+name}/saved:generate', options)
|
|
852
|
+
command.response_representation = Google::Apis::AdsenseV2::ReportResult::Representation
|
|
853
|
+
command.response_class = Google::Apis::AdsenseV2::ReportResult
|
|
854
|
+
command.params['name'] = name unless name.nil?
|
|
855
|
+
command.query['currencyCode'] = currency_code unless currency_code.nil?
|
|
856
|
+
command.query['dateRange'] = date_range unless date_range.nil?
|
|
857
|
+
command.query['endDate.day'] = end_date_day unless end_date_day.nil?
|
|
858
|
+
command.query['endDate.month'] = end_date_month unless end_date_month.nil?
|
|
859
|
+
command.query['endDate.year'] = end_date_year unless end_date_year.nil?
|
|
860
|
+
command.query['languageCode'] = language_code unless language_code.nil?
|
|
861
|
+
command.query['reportingTimeZone'] = reporting_time_zone unless reporting_time_zone.nil?
|
|
862
|
+
command.query['startDate.day'] = start_date_day unless start_date_day.nil?
|
|
863
|
+
command.query['startDate.month'] = start_date_month unless start_date_month.nil?
|
|
864
|
+
command.query['startDate.year'] = start_date_year unless start_date_year.nil?
|
|
865
|
+
command.query['fields'] = fields unless fields.nil?
|
|
866
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
867
|
+
execute_or_queue_command(command, &block)
|
|
868
|
+
end
|
|
869
|
+
|
|
870
|
+
# Generates a csv formatted saved report.
|
|
871
|
+
# @param [String] name
|
|
872
|
+
# Required. Name of the saved report. Format: accounts/`account`/reports/`report`
|
|
873
|
+
# @param [String] currency_code
|
|
874
|
+
# The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) to use
|
|
875
|
+
# when reporting on monetary metrics. Defaults to the account's currency if not
|
|
876
|
+
# set.
|
|
877
|
+
# @param [String] date_range
|
|
878
|
+
# Date range of the report, if unset the range will be considered CUSTOM.
|
|
879
|
+
# @param [Fixnum] end_date_day
|
|
880
|
+
# Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
|
|
881
|
+
# specify a year by itself or a year and month where the day isn't significant.
|
|
882
|
+
# @param [Fixnum] end_date_month
|
|
883
|
+
# Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
|
|
884
|
+
# and day.
|
|
885
|
+
# @param [Fixnum] end_date_year
|
|
886
|
+
# Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
|
|
887
|
+
# year.
|
|
888
|
+
# @param [String] language_code
|
|
889
|
+
# The language to use for translating report output. If unspecified, this
|
|
890
|
+
# defaults to English ("en"). If the given language is not supported, report
|
|
891
|
+
# output will be returned in English. The language is specified as an [IETF BCP-
|
|
892
|
+
# 47 language code](https://en.wikipedia.org/wiki/IETF_language_tag).
|
|
893
|
+
# @param [String] reporting_time_zone
|
|
894
|
+
# Timezone in which to generate the report. If unspecified, this defaults to the
|
|
895
|
+
# account timezone. For more information, see [changing the time zone of your
|
|
896
|
+
# reports](https://support.google.com/adsense/answer/9830725).
|
|
897
|
+
# @param [Fixnum] start_date_day
|
|
898
|
+
# Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
|
|
899
|
+
# specify a year by itself or a year and month where the day isn't significant.
|
|
900
|
+
# @param [Fixnum] start_date_month
|
|
901
|
+
# Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
|
|
902
|
+
# and day.
|
|
903
|
+
# @param [Fixnum] start_date_year
|
|
904
|
+
# Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
|
|
905
|
+
# year.
|
|
906
|
+
# @param [String] fields
|
|
907
|
+
# Selector specifying which fields to include in a partial response.
|
|
908
|
+
# @param [String] quota_user
|
|
909
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
910
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
911
|
+
# @param [Google::Apis::RequestOptions] options
|
|
912
|
+
# Request-specific options
|
|
913
|
+
#
|
|
914
|
+
# @yield [result, err] Result & error if block supplied
|
|
915
|
+
# @yieldparam result [Google::Apis::AdsenseV2::HttpBody] parsed result object
|
|
916
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
917
|
+
#
|
|
918
|
+
# @return [Google::Apis::AdsenseV2::HttpBody]
|
|
919
|
+
#
|
|
920
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
921
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
922
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
923
|
+
def generate_account_report_saved_csv(name, currency_code: nil, date_range: nil, end_date_day: nil, end_date_month: nil, end_date_year: nil, language_code: nil, reporting_time_zone: nil, start_date_day: nil, start_date_month: nil, start_date_year: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
924
|
+
command = make_simple_command(:get, 'v2/{+name}/saved:generateCsv', options)
|
|
925
|
+
command.response_representation = Google::Apis::AdsenseV2::HttpBody::Representation
|
|
926
|
+
command.response_class = Google::Apis::AdsenseV2::HttpBody
|
|
927
|
+
command.params['name'] = name unless name.nil?
|
|
928
|
+
command.query['currencyCode'] = currency_code unless currency_code.nil?
|
|
929
|
+
command.query['dateRange'] = date_range unless date_range.nil?
|
|
930
|
+
command.query['endDate.day'] = end_date_day unless end_date_day.nil?
|
|
931
|
+
command.query['endDate.month'] = end_date_month unless end_date_month.nil?
|
|
932
|
+
command.query['endDate.year'] = end_date_year unless end_date_year.nil?
|
|
933
|
+
command.query['languageCode'] = language_code unless language_code.nil?
|
|
934
|
+
command.query['reportingTimeZone'] = reporting_time_zone unless reporting_time_zone.nil?
|
|
935
|
+
command.query['startDate.day'] = start_date_day unless start_date_day.nil?
|
|
936
|
+
command.query['startDate.month'] = start_date_month unless start_date_month.nil?
|
|
937
|
+
command.query['startDate.year'] = start_date_year unless start_date_year.nil?
|
|
938
|
+
command.query['fields'] = fields unless fields.nil?
|
|
939
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
940
|
+
execute_or_queue_command(command, &block)
|
|
941
|
+
end
|
|
942
|
+
|
|
943
|
+
# Lists saved reports.
|
|
944
|
+
# @param [String] parent
|
|
945
|
+
# Required. The account which owns the collection of reports. Format: accounts/`
|
|
946
|
+
# account`
|
|
947
|
+
# @param [Fixnum] page_size
|
|
948
|
+
# The maximum number of reports to include in the response, used for paging. If
|
|
949
|
+
# unspecified, at most 10000 reports will be returned. The maximum value is
|
|
950
|
+
# 10000; values above 10000 will be coerced to 10000.
|
|
951
|
+
# @param [String] page_token
|
|
952
|
+
# A page token, received from a previous `ListPayments` call. Provide this to
|
|
953
|
+
# retrieve the subsequent page. When paginating, all other parameters provided
|
|
954
|
+
# to `ListPayments` must match the call that provided the page token.
|
|
955
|
+
# @param [String] fields
|
|
956
|
+
# Selector specifying which fields to include in a partial response.
|
|
957
|
+
# @param [String] quota_user
|
|
958
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
959
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
960
|
+
# @param [Google::Apis::RequestOptions] options
|
|
961
|
+
# Request-specific options
|
|
962
|
+
#
|
|
963
|
+
# @yield [result, err] Result & error if block supplied
|
|
964
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ListSavedReportsResponse] parsed result object
|
|
965
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
966
|
+
#
|
|
967
|
+
# @return [Google::Apis::AdsenseV2::ListSavedReportsResponse]
|
|
968
|
+
#
|
|
969
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
970
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
971
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
972
|
+
def list_account_report_saveds(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
973
|
+
command = make_simple_command(:get, 'v2/{+parent}/reports/saved', options)
|
|
974
|
+
command.response_representation = Google::Apis::AdsenseV2::ListSavedReportsResponse::Representation
|
|
975
|
+
command.response_class = Google::Apis::AdsenseV2::ListSavedReportsResponse
|
|
976
|
+
command.params['parent'] = parent unless parent.nil?
|
|
977
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
978
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
979
|
+
command.query['fields'] = fields unless fields.nil?
|
|
980
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
981
|
+
execute_or_queue_command(command, &block)
|
|
982
|
+
end
|
|
983
|
+
|
|
984
|
+
# Gets information about the selected site.
|
|
985
|
+
# @param [String] name
|
|
986
|
+
# Required. Name of the site. Format: accounts/`account`/sites/`site`
|
|
987
|
+
# @param [String] fields
|
|
988
|
+
# Selector specifying which fields to include in a partial response.
|
|
989
|
+
# @param [String] quota_user
|
|
990
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
991
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
992
|
+
# @param [Google::Apis::RequestOptions] options
|
|
993
|
+
# Request-specific options
|
|
994
|
+
#
|
|
995
|
+
# @yield [result, err] Result & error if block supplied
|
|
996
|
+
# @yieldparam result [Google::Apis::AdsenseV2::Site] parsed result object
|
|
997
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
998
|
+
#
|
|
999
|
+
# @return [Google::Apis::AdsenseV2::Site]
|
|
1000
|
+
#
|
|
1001
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1002
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1003
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1004
|
+
def get_account_site(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
1005
|
+
command = make_simple_command(:get, 'v2/{+name}', options)
|
|
1006
|
+
command.response_representation = Google::Apis::AdsenseV2::Site::Representation
|
|
1007
|
+
command.response_class = Google::Apis::AdsenseV2::Site
|
|
1008
|
+
command.params['name'] = name unless name.nil?
|
|
1009
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1010
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1011
|
+
execute_or_queue_command(command, &block)
|
|
1012
|
+
end
|
|
1013
|
+
|
|
1014
|
+
# Lists all the sites available in an account.
|
|
1015
|
+
# @param [String] parent
|
|
1016
|
+
# Required. The account which owns the collection of sites. Format: accounts/`
|
|
1017
|
+
# account`
|
|
1018
|
+
# @param [Fixnum] page_size
|
|
1019
|
+
# The maximum number of sites to include in the response, used for paging. If
|
|
1020
|
+
# unspecified, at most 10000 sites will be returned. The maximum value is 10000;
|
|
1021
|
+
# values above 10000 will be coerced to 10000.
|
|
1022
|
+
# @param [String] page_token
|
|
1023
|
+
# A page token, received from a previous `ListSites` call. Provide this to
|
|
1024
|
+
# retrieve the subsequent page. When paginating, all other parameters provided
|
|
1025
|
+
# to `ListSites` must match the call that provided the page token.
|
|
1026
|
+
# @param [String] fields
|
|
1027
|
+
# Selector specifying which fields to include in a partial response.
|
|
1028
|
+
# @param [String] quota_user
|
|
1029
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1030
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1031
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1032
|
+
# Request-specific options
|
|
1033
|
+
#
|
|
1034
|
+
# @yield [result, err] Result & error if block supplied
|
|
1035
|
+
# @yieldparam result [Google::Apis::AdsenseV2::ListSitesResponse] parsed result object
|
|
1036
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1037
|
+
#
|
|
1038
|
+
# @return [Google::Apis::AdsenseV2::ListSitesResponse]
|
|
1039
|
+
#
|
|
1040
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1041
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1042
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1043
|
+
def list_account_sites(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1044
|
+
command = make_simple_command(:get, 'v2/{+parent}/sites', options)
|
|
1045
|
+
command.response_representation = Google::Apis::AdsenseV2::ListSitesResponse::Representation
|
|
1046
|
+
command.response_class = Google::Apis::AdsenseV2::ListSitesResponse
|
|
1047
|
+
command.params['parent'] = parent unless parent.nil?
|
|
1048
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
1049
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
1050
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1051
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1052
|
+
execute_or_queue_command(command, &block)
|
|
1053
|
+
end
|
|
1054
|
+
|
|
1055
|
+
protected
|
|
1056
|
+
|
|
1057
|
+
def apply_command_defaults(command)
|
|
1058
|
+
command.query['key'] = key unless key.nil?
|
|
1059
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1060
|
+
end
|
|
1061
|
+
end
|
|
1062
|
+
end
|
|
1063
|
+
end
|
|
1064
|
+
end
|