google-apis-blogger_v3 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-blogger_v3.rb +15 -0
- data/lib/google/apis/blogger_v3.rb +39 -0
- data/lib/google/apis/blogger_v3/classes.rb +1360 -0
- data/lib/google/apis/blogger_v3/gem_version.rb +28 -0
- data/lib/google/apis/blogger_v3/representations.rb +624 -0
- data/lib/google/apis/blogger_v3/service.rb +1241 -0
- metadata +76 -0
@@ -0,0 +1,1241 @@
|
|
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 BloggerV3
|
23
|
+
# Blogger API v3
|
24
|
+
#
|
25
|
+
# The Blogger API provides access to posts, comments and pages of a Blogger blog.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/blogger_v3'
|
29
|
+
#
|
30
|
+
# Blogger = Google::Apis::BloggerV3 # Alias the module
|
31
|
+
# service = Blogger::BloggerService.new
|
32
|
+
#
|
33
|
+
# @see https://developers.google.com/blogger/docs/3.0/getting_started
|
34
|
+
class BloggerService < 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
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
+
attr_accessor :quota_user
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
super('https://blogger.googleapis.com/', '',
|
47
|
+
client_name: 'google-apis-blogger_v3',
|
48
|
+
client_version: Google::Apis::BloggerV3::GEM_VERSION)
|
49
|
+
@batch_path = 'batch'
|
50
|
+
end
|
51
|
+
|
52
|
+
# Gets one blog and user info pair by blog id and user id.
|
53
|
+
# @param [String] user_id
|
54
|
+
# @param [String] blog_id
|
55
|
+
# @param [Fixnum] max_posts
|
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::BloggerV3::BlogUserInfo] parsed result object
|
66
|
+
# @yieldparam err [StandardError] error object if request failed
|
67
|
+
#
|
68
|
+
# @return [Google::Apis::BloggerV3::BlogUserInfo]
|
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_blog_user_info(user_id, blog_id, max_posts: nil, fields: nil, quota_user: nil, options: nil, &block)
|
74
|
+
command = make_simple_command(:get, 'v3/users/{userId}/blogs/{blogId}', options)
|
75
|
+
command.response_representation = Google::Apis::BloggerV3::BlogUserInfo::Representation
|
76
|
+
command.response_class = Google::Apis::BloggerV3::BlogUserInfo
|
77
|
+
command.params['userId'] = user_id unless user_id.nil?
|
78
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
79
|
+
command.query['maxPosts'] = max_posts unless max_posts.nil?
|
80
|
+
command.query['fields'] = fields unless fields.nil?
|
81
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
82
|
+
execute_or_queue_command(command, &block)
|
83
|
+
end
|
84
|
+
|
85
|
+
# Gets a blog by id.
|
86
|
+
# @param [String] blog_id
|
87
|
+
# @param [Fixnum] max_posts
|
88
|
+
# @param [String] view
|
89
|
+
# @param [String] fields
|
90
|
+
# Selector specifying which fields to include in a partial response.
|
91
|
+
# @param [String] quota_user
|
92
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
93
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
94
|
+
# @param [Google::Apis::RequestOptions] options
|
95
|
+
# Request-specific options
|
96
|
+
#
|
97
|
+
# @yield [result, err] Result & error if block supplied
|
98
|
+
# @yieldparam result [Google::Apis::BloggerV3::Blog] parsed result object
|
99
|
+
# @yieldparam err [StandardError] error object if request failed
|
100
|
+
#
|
101
|
+
# @return [Google::Apis::BloggerV3::Blog]
|
102
|
+
#
|
103
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
104
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
105
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
106
|
+
def get_blog(blog_id, max_posts: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
107
|
+
command = make_simple_command(:get, 'v3/blogs/{blogId}', options)
|
108
|
+
command.response_representation = Google::Apis::BloggerV3::Blog::Representation
|
109
|
+
command.response_class = Google::Apis::BloggerV3::Blog
|
110
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
111
|
+
command.query['maxPosts'] = max_posts unless max_posts.nil?
|
112
|
+
command.query['view'] = view unless view.nil?
|
113
|
+
command.query['fields'] = fields unless fields.nil?
|
114
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
115
|
+
execute_or_queue_command(command, &block)
|
116
|
+
end
|
117
|
+
|
118
|
+
# Gets a blog by url.
|
119
|
+
# @param [String] url
|
120
|
+
# @param [String] view
|
121
|
+
# @param [String] fields
|
122
|
+
# Selector specifying which fields to include in a partial response.
|
123
|
+
# @param [String] quota_user
|
124
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
125
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
126
|
+
# @param [Google::Apis::RequestOptions] options
|
127
|
+
# Request-specific options
|
128
|
+
#
|
129
|
+
# @yield [result, err] Result & error if block supplied
|
130
|
+
# @yieldparam result [Google::Apis::BloggerV3::Blog] parsed result object
|
131
|
+
# @yieldparam err [StandardError] error object if request failed
|
132
|
+
#
|
133
|
+
# @return [Google::Apis::BloggerV3::Blog]
|
134
|
+
#
|
135
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
136
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
137
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
138
|
+
def get_blog_by_url(url, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
139
|
+
command = make_simple_command(:get, 'v3/blogs/byurl', options)
|
140
|
+
command.response_representation = Google::Apis::BloggerV3::Blog::Representation
|
141
|
+
command.response_class = Google::Apis::BloggerV3::Blog
|
142
|
+
command.query['url'] = url unless url.nil?
|
143
|
+
command.query['view'] = view unless view.nil?
|
144
|
+
command.query['fields'] = fields unless fields.nil?
|
145
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
146
|
+
execute_or_queue_command(command, &block)
|
147
|
+
end
|
148
|
+
|
149
|
+
# Lists blogs by user.
|
150
|
+
# @param [String] user_id
|
151
|
+
# @param [Boolean] fetch_user_info
|
152
|
+
# @param [Array<String>, String] role
|
153
|
+
# @param [Array<String>, String] status
|
154
|
+
# Default value of status is LIVE.
|
155
|
+
# @param [String] view
|
156
|
+
# @param [String] fields
|
157
|
+
# Selector specifying which fields to include in a partial response.
|
158
|
+
# @param [String] quota_user
|
159
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
160
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
161
|
+
# @param [Google::Apis::RequestOptions] options
|
162
|
+
# Request-specific options
|
163
|
+
#
|
164
|
+
# @yield [result, err] Result & error if block supplied
|
165
|
+
# @yieldparam result [Google::Apis::BloggerV3::BlogList] parsed result object
|
166
|
+
# @yieldparam err [StandardError] error object if request failed
|
167
|
+
#
|
168
|
+
# @return [Google::Apis::BloggerV3::BlogList]
|
169
|
+
#
|
170
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
171
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
172
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
173
|
+
def list_blogs_by_user(user_id, fetch_user_info: nil, role: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
174
|
+
command = make_simple_command(:get, 'v3/users/{userId}/blogs', options)
|
175
|
+
command.response_representation = Google::Apis::BloggerV3::BlogList::Representation
|
176
|
+
command.response_class = Google::Apis::BloggerV3::BlogList
|
177
|
+
command.params['userId'] = user_id unless user_id.nil?
|
178
|
+
command.query['fetchUserInfo'] = fetch_user_info unless fetch_user_info.nil?
|
179
|
+
command.query['role'] = role unless role.nil?
|
180
|
+
command.query['status'] = status unless status.nil?
|
181
|
+
command.query['view'] = view unless view.nil?
|
182
|
+
command.query['fields'] = fields unless fields.nil?
|
183
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
184
|
+
execute_or_queue_command(command, &block)
|
185
|
+
end
|
186
|
+
|
187
|
+
# Marks a comment as not spam by blog id, post id and comment id.
|
188
|
+
# @param [String] blog_id
|
189
|
+
# @param [String] post_id
|
190
|
+
# @param [String] comment_id
|
191
|
+
# @param [String] fields
|
192
|
+
# Selector specifying which fields to include in a partial response.
|
193
|
+
# @param [String] quota_user
|
194
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
195
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
196
|
+
# @param [Google::Apis::RequestOptions] options
|
197
|
+
# Request-specific options
|
198
|
+
#
|
199
|
+
# @yield [result, err] Result & error if block supplied
|
200
|
+
# @yieldparam result [Google::Apis::BloggerV3::Comment] parsed result object
|
201
|
+
# @yieldparam err [StandardError] error object if request failed
|
202
|
+
#
|
203
|
+
# @return [Google::Apis::BloggerV3::Comment]
|
204
|
+
#
|
205
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
206
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
207
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
208
|
+
def approve_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil, &block)
|
209
|
+
command = make_simple_command(:post, 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/approve', options)
|
210
|
+
command.response_representation = Google::Apis::BloggerV3::Comment::Representation
|
211
|
+
command.response_class = Google::Apis::BloggerV3::Comment
|
212
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
213
|
+
command.params['postId'] = post_id unless post_id.nil?
|
214
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
215
|
+
command.query['fields'] = fields unless fields.nil?
|
216
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
217
|
+
execute_or_queue_command(command, &block)
|
218
|
+
end
|
219
|
+
|
220
|
+
# Deletes a comment by blog id, post id and comment id.
|
221
|
+
# @param [String] blog_id
|
222
|
+
# @param [String] post_id
|
223
|
+
# @param [String] comment_id
|
224
|
+
# @param [String] fields
|
225
|
+
# Selector specifying which fields to include in a partial response.
|
226
|
+
# @param [String] quota_user
|
227
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
228
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
229
|
+
# @param [Google::Apis::RequestOptions] options
|
230
|
+
# Request-specific options
|
231
|
+
#
|
232
|
+
# @yield [result, err] Result & error if block supplied
|
233
|
+
# @yieldparam result [NilClass] No result returned for this method
|
234
|
+
# @yieldparam err [StandardError] error object if request failed
|
235
|
+
#
|
236
|
+
# @return [void]
|
237
|
+
#
|
238
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
239
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
240
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
241
|
+
def delete_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil, &block)
|
242
|
+
command = make_simple_command(:delete, 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}', options)
|
243
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
244
|
+
command.params['postId'] = post_id unless post_id.nil?
|
245
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
246
|
+
command.query['fields'] = fields unless fields.nil?
|
247
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
248
|
+
execute_or_queue_command(command, &block)
|
249
|
+
end
|
250
|
+
|
251
|
+
# Gets a comment by id.
|
252
|
+
# @param [String] blog_id
|
253
|
+
# @param [String] post_id
|
254
|
+
# @param [String] comment_id
|
255
|
+
# @param [String] view
|
256
|
+
# @param [String] fields
|
257
|
+
# Selector specifying which fields to include in a partial response.
|
258
|
+
# @param [String] quota_user
|
259
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
260
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
261
|
+
# @param [Google::Apis::RequestOptions] options
|
262
|
+
# Request-specific options
|
263
|
+
#
|
264
|
+
# @yield [result, err] Result & error if block supplied
|
265
|
+
# @yieldparam result [Google::Apis::BloggerV3::Comment] parsed result object
|
266
|
+
# @yieldparam err [StandardError] error object if request failed
|
267
|
+
#
|
268
|
+
# @return [Google::Apis::BloggerV3::Comment]
|
269
|
+
#
|
270
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
271
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
272
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
273
|
+
def get_comment(blog_id, post_id, comment_id, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
274
|
+
command = make_simple_command(:get, 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}', options)
|
275
|
+
command.response_representation = Google::Apis::BloggerV3::Comment::Representation
|
276
|
+
command.response_class = Google::Apis::BloggerV3::Comment
|
277
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
278
|
+
command.params['postId'] = post_id unless post_id.nil?
|
279
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
280
|
+
command.query['view'] = view unless view.nil?
|
281
|
+
command.query['fields'] = fields unless fields.nil?
|
282
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
283
|
+
execute_or_queue_command(command, &block)
|
284
|
+
end
|
285
|
+
|
286
|
+
# Lists comments.
|
287
|
+
# @param [String] blog_id
|
288
|
+
# @param [String] post_id
|
289
|
+
# @param [String] end_date
|
290
|
+
# @param [Boolean] fetch_bodies
|
291
|
+
# @param [Fixnum] max_results
|
292
|
+
# @param [String] page_token
|
293
|
+
# @param [String] start_date
|
294
|
+
# @param [String] status
|
295
|
+
# @param [String] view
|
296
|
+
# @param [String] fields
|
297
|
+
# Selector specifying which fields to include in a partial response.
|
298
|
+
# @param [String] quota_user
|
299
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
300
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
301
|
+
# @param [Google::Apis::RequestOptions] options
|
302
|
+
# Request-specific options
|
303
|
+
#
|
304
|
+
# @yield [result, err] Result & error if block supplied
|
305
|
+
# @yieldparam result [Google::Apis::BloggerV3::CommentList] parsed result object
|
306
|
+
# @yieldparam err [StandardError] error object if request failed
|
307
|
+
#
|
308
|
+
# @return [Google::Apis::BloggerV3::CommentList]
|
309
|
+
#
|
310
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
311
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
312
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
313
|
+
def list_comments(blog_id, post_id, end_date: nil, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
314
|
+
command = make_simple_command(:get, 'v3/blogs/{blogId}/posts/{postId}/comments', options)
|
315
|
+
command.response_representation = Google::Apis::BloggerV3::CommentList::Representation
|
316
|
+
command.response_class = Google::Apis::BloggerV3::CommentList
|
317
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
318
|
+
command.params['postId'] = post_id unless post_id.nil?
|
319
|
+
command.query['endDate'] = end_date unless end_date.nil?
|
320
|
+
command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
|
321
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
322
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
323
|
+
command.query['startDate'] = start_date unless start_date.nil?
|
324
|
+
command.query['status'] = status unless status.nil?
|
325
|
+
command.query['view'] = view unless view.nil?
|
326
|
+
command.query['fields'] = fields unless fields.nil?
|
327
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
328
|
+
execute_or_queue_command(command, &block)
|
329
|
+
end
|
330
|
+
|
331
|
+
# Lists comments by blog.
|
332
|
+
# @param [String] blog_id
|
333
|
+
# @param [String] end_date
|
334
|
+
# @param [Boolean] fetch_bodies
|
335
|
+
# @param [Fixnum] max_results
|
336
|
+
# @param [String] page_token
|
337
|
+
# @param [String] start_date
|
338
|
+
# @param [Array<String>, String] status
|
339
|
+
# @param [String] fields
|
340
|
+
# Selector specifying which fields to include in a partial response.
|
341
|
+
# @param [String] quota_user
|
342
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
343
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
344
|
+
# @param [Google::Apis::RequestOptions] options
|
345
|
+
# Request-specific options
|
346
|
+
#
|
347
|
+
# @yield [result, err] Result & error if block supplied
|
348
|
+
# @yieldparam result [Google::Apis::BloggerV3::CommentList] parsed result object
|
349
|
+
# @yieldparam err [StandardError] error object if request failed
|
350
|
+
#
|
351
|
+
# @return [Google::Apis::BloggerV3::CommentList]
|
352
|
+
#
|
353
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
354
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
355
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
356
|
+
def list_comments_by_blog(blog_id, end_date: nil, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, status: nil, fields: nil, quota_user: nil, options: nil, &block)
|
357
|
+
command = make_simple_command(:get, 'v3/blogs/{blogId}/comments', options)
|
358
|
+
command.response_representation = Google::Apis::BloggerV3::CommentList::Representation
|
359
|
+
command.response_class = Google::Apis::BloggerV3::CommentList
|
360
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
361
|
+
command.query['endDate'] = end_date unless end_date.nil?
|
362
|
+
command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
|
363
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
364
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
365
|
+
command.query['startDate'] = start_date unless start_date.nil?
|
366
|
+
command.query['status'] = status unless status.nil?
|
367
|
+
command.query['fields'] = fields unless fields.nil?
|
368
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
369
|
+
execute_or_queue_command(command, &block)
|
370
|
+
end
|
371
|
+
|
372
|
+
# Marks a comment as spam by blog id, post id and comment id.
|
373
|
+
# @param [String] blog_id
|
374
|
+
# @param [String] post_id
|
375
|
+
# @param [String] comment_id
|
376
|
+
# @param [String] fields
|
377
|
+
# Selector specifying which fields to include in a partial response.
|
378
|
+
# @param [String] quota_user
|
379
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
380
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
381
|
+
# @param [Google::Apis::RequestOptions] options
|
382
|
+
# Request-specific options
|
383
|
+
#
|
384
|
+
# @yield [result, err] Result & error if block supplied
|
385
|
+
# @yieldparam result [Google::Apis::BloggerV3::Comment] parsed result object
|
386
|
+
# @yieldparam err [StandardError] error object if request failed
|
387
|
+
#
|
388
|
+
# @return [Google::Apis::BloggerV3::Comment]
|
389
|
+
#
|
390
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
391
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
392
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
393
|
+
def mark_comment_as_spam(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil, &block)
|
394
|
+
command = make_simple_command(:post, 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/spam', options)
|
395
|
+
command.response_representation = Google::Apis::BloggerV3::Comment::Representation
|
396
|
+
command.response_class = Google::Apis::BloggerV3::Comment
|
397
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
398
|
+
command.params['postId'] = post_id unless post_id.nil?
|
399
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
400
|
+
command.query['fields'] = fields unless fields.nil?
|
401
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
402
|
+
execute_or_queue_command(command, &block)
|
403
|
+
end
|
404
|
+
|
405
|
+
# Removes the content of a comment by blog id, post id and comment id.
|
406
|
+
# @param [String] blog_id
|
407
|
+
# @param [String] post_id
|
408
|
+
# @param [String] comment_id
|
409
|
+
# @param [String] fields
|
410
|
+
# Selector specifying which fields to include in a partial response.
|
411
|
+
# @param [String] quota_user
|
412
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
413
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
414
|
+
# @param [Google::Apis::RequestOptions] options
|
415
|
+
# Request-specific options
|
416
|
+
#
|
417
|
+
# @yield [result, err] Result & error if block supplied
|
418
|
+
# @yieldparam result [Google::Apis::BloggerV3::Comment] parsed result object
|
419
|
+
# @yieldparam err [StandardError] error object if request failed
|
420
|
+
#
|
421
|
+
# @return [Google::Apis::BloggerV3::Comment]
|
422
|
+
#
|
423
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
424
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
425
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
426
|
+
def remove_comment_content(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil, &block)
|
427
|
+
command = make_simple_command(:post, 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/removecontent', options)
|
428
|
+
command.response_representation = Google::Apis::BloggerV3::Comment::Representation
|
429
|
+
command.response_class = Google::Apis::BloggerV3::Comment
|
430
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
431
|
+
command.params['postId'] = post_id unless post_id.nil?
|
432
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
433
|
+
command.query['fields'] = fields unless fields.nil?
|
434
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
435
|
+
execute_or_queue_command(command, &block)
|
436
|
+
end
|
437
|
+
|
438
|
+
# Gets page views by blog id.
|
439
|
+
# @param [String] blog_id
|
440
|
+
# @param [Array<String>, String] range
|
441
|
+
# @param [String] fields
|
442
|
+
# Selector specifying which fields to include in a partial response.
|
443
|
+
# @param [String] quota_user
|
444
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
445
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
446
|
+
# @param [Google::Apis::RequestOptions] options
|
447
|
+
# Request-specific options
|
448
|
+
#
|
449
|
+
# @yield [result, err] Result & error if block supplied
|
450
|
+
# @yieldparam result [Google::Apis::BloggerV3::Pageviews] parsed result object
|
451
|
+
# @yieldparam err [StandardError] error object if request failed
|
452
|
+
#
|
453
|
+
# @return [Google::Apis::BloggerV3::Pageviews]
|
454
|
+
#
|
455
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
456
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
457
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
458
|
+
def get_page_view(blog_id, range: nil, fields: nil, quota_user: nil, options: nil, &block)
|
459
|
+
command = make_simple_command(:get, 'v3/blogs/{blogId}/pageviews', options)
|
460
|
+
command.response_representation = Google::Apis::BloggerV3::Pageviews::Representation
|
461
|
+
command.response_class = Google::Apis::BloggerV3::Pageviews
|
462
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
463
|
+
command.query['range'] = range unless range.nil?
|
464
|
+
command.query['fields'] = fields unless fields.nil?
|
465
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
466
|
+
execute_or_queue_command(command, &block)
|
467
|
+
end
|
468
|
+
|
469
|
+
# Deletes a page by blog id and page id.
|
470
|
+
# @param [String] blog_id
|
471
|
+
# @param [String] page_id
|
472
|
+
# @param [String] fields
|
473
|
+
# Selector specifying which fields to include in a partial response.
|
474
|
+
# @param [String] quota_user
|
475
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
476
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
477
|
+
# @param [Google::Apis::RequestOptions] options
|
478
|
+
# Request-specific options
|
479
|
+
#
|
480
|
+
# @yield [result, err] Result & error if block supplied
|
481
|
+
# @yieldparam result [NilClass] No result returned for this method
|
482
|
+
# @yieldparam err [StandardError] error object if request failed
|
483
|
+
#
|
484
|
+
# @return [void]
|
485
|
+
#
|
486
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
487
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
488
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
489
|
+
def delete_page(blog_id, page_id, fields: nil, quota_user: nil, options: nil, &block)
|
490
|
+
command = make_simple_command(:delete, 'v3/blogs/{blogId}/pages/{pageId}', options)
|
491
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
492
|
+
command.params['pageId'] = page_id unless page_id.nil?
|
493
|
+
command.query['fields'] = fields unless fields.nil?
|
494
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
495
|
+
execute_or_queue_command(command, &block)
|
496
|
+
end
|
497
|
+
|
498
|
+
# Gets a page by blog id and page id.
|
499
|
+
# @param [String] blog_id
|
500
|
+
# @param [String] page_id
|
501
|
+
# @param [String] view
|
502
|
+
# @param [String] fields
|
503
|
+
# Selector specifying which fields to include in a partial response.
|
504
|
+
# @param [String] quota_user
|
505
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
506
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
507
|
+
# @param [Google::Apis::RequestOptions] options
|
508
|
+
# Request-specific options
|
509
|
+
#
|
510
|
+
# @yield [result, err] Result & error if block supplied
|
511
|
+
# @yieldparam result [Google::Apis::BloggerV3::Page] parsed result object
|
512
|
+
# @yieldparam err [StandardError] error object if request failed
|
513
|
+
#
|
514
|
+
# @return [Google::Apis::BloggerV3::Page]
|
515
|
+
#
|
516
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
517
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
518
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
519
|
+
def get_page(blog_id, page_id, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
520
|
+
command = make_simple_command(:get, 'v3/blogs/{blogId}/pages/{pageId}', options)
|
521
|
+
command.response_representation = Google::Apis::BloggerV3::Page::Representation
|
522
|
+
command.response_class = Google::Apis::BloggerV3::Page
|
523
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
524
|
+
command.params['pageId'] = page_id unless page_id.nil?
|
525
|
+
command.query['view'] = view unless view.nil?
|
526
|
+
command.query['fields'] = fields unless fields.nil?
|
527
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
528
|
+
execute_or_queue_command(command, &block)
|
529
|
+
end
|
530
|
+
|
531
|
+
# Inserts a page.
|
532
|
+
# @param [String] blog_id
|
533
|
+
# @param [Google::Apis::BloggerV3::Page] page_object
|
534
|
+
# @param [Boolean] is_draft
|
535
|
+
# @param [String] fields
|
536
|
+
# Selector specifying which fields to include in a partial response.
|
537
|
+
# @param [String] quota_user
|
538
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
539
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
540
|
+
# @param [Google::Apis::RequestOptions] options
|
541
|
+
# Request-specific options
|
542
|
+
#
|
543
|
+
# @yield [result, err] Result & error if block supplied
|
544
|
+
# @yieldparam result [Google::Apis::BloggerV3::Page] parsed result object
|
545
|
+
# @yieldparam err [StandardError] error object if request failed
|
546
|
+
#
|
547
|
+
# @return [Google::Apis::BloggerV3::Page]
|
548
|
+
#
|
549
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
550
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
551
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
552
|
+
def insert_page(blog_id, page_object = nil, is_draft: nil, fields: nil, quota_user: nil, options: nil, &block)
|
553
|
+
command = make_simple_command(:post, 'v3/blogs/{blogId}/pages', options)
|
554
|
+
command.request_representation = Google::Apis::BloggerV3::Page::Representation
|
555
|
+
command.request_object = page_object
|
556
|
+
command.response_representation = Google::Apis::BloggerV3::Page::Representation
|
557
|
+
command.response_class = Google::Apis::BloggerV3::Page
|
558
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
559
|
+
command.query['isDraft'] = is_draft unless is_draft.nil?
|
560
|
+
command.query['fields'] = fields unless fields.nil?
|
561
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
562
|
+
execute_or_queue_command(command, &block)
|
563
|
+
end
|
564
|
+
|
565
|
+
# Lists pages.
|
566
|
+
# @param [String] blog_id
|
567
|
+
# @param [Boolean] fetch_bodies
|
568
|
+
# @param [Fixnum] max_results
|
569
|
+
# @param [String] page_token
|
570
|
+
# @param [Array<String>, String] status
|
571
|
+
# @param [String] view
|
572
|
+
# @param [String] fields
|
573
|
+
# Selector specifying which fields to include in a partial response.
|
574
|
+
# @param [String] quota_user
|
575
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
576
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
577
|
+
# @param [Google::Apis::RequestOptions] options
|
578
|
+
# Request-specific options
|
579
|
+
#
|
580
|
+
# @yield [result, err] Result & error if block supplied
|
581
|
+
# @yieldparam result [Google::Apis::BloggerV3::PageList] parsed result object
|
582
|
+
# @yieldparam err [StandardError] error object if request failed
|
583
|
+
#
|
584
|
+
# @return [Google::Apis::BloggerV3::PageList]
|
585
|
+
#
|
586
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
587
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
588
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
589
|
+
def list_pages(blog_id, fetch_bodies: nil, max_results: nil, page_token: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
590
|
+
command = make_simple_command(:get, 'v3/blogs/{blogId}/pages', options)
|
591
|
+
command.response_representation = Google::Apis::BloggerV3::PageList::Representation
|
592
|
+
command.response_class = Google::Apis::BloggerV3::PageList
|
593
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
594
|
+
command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
|
595
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
596
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
597
|
+
command.query['status'] = status unless status.nil?
|
598
|
+
command.query['view'] = view unless view.nil?
|
599
|
+
command.query['fields'] = fields unless fields.nil?
|
600
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
601
|
+
execute_or_queue_command(command, &block)
|
602
|
+
end
|
603
|
+
|
604
|
+
# Patches a page.
|
605
|
+
# @param [String] blog_id
|
606
|
+
# @param [String] page_id
|
607
|
+
# @param [Google::Apis::BloggerV3::Page] page_object
|
608
|
+
# @param [Boolean] publish
|
609
|
+
# @param [Boolean] revert
|
610
|
+
# @param [String] fields
|
611
|
+
# Selector specifying which fields to include in a partial response.
|
612
|
+
# @param [String] quota_user
|
613
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
614
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
615
|
+
# @param [Google::Apis::RequestOptions] options
|
616
|
+
# Request-specific options
|
617
|
+
#
|
618
|
+
# @yield [result, err] Result & error if block supplied
|
619
|
+
# @yieldparam result [Google::Apis::BloggerV3::Page] parsed result object
|
620
|
+
# @yieldparam err [StandardError] error object if request failed
|
621
|
+
#
|
622
|
+
# @return [Google::Apis::BloggerV3::Page]
|
623
|
+
#
|
624
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
625
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
626
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
627
|
+
def patch_page(blog_id, page_id, page_object = nil, publish: nil, revert: nil, fields: nil, quota_user: nil, options: nil, &block)
|
628
|
+
command = make_simple_command(:patch, 'v3/blogs/{blogId}/pages/{pageId}', options)
|
629
|
+
command.request_representation = Google::Apis::BloggerV3::Page::Representation
|
630
|
+
command.request_object = page_object
|
631
|
+
command.response_representation = Google::Apis::BloggerV3::Page::Representation
|
632
|
+
command.response_class = Google::Apis::BloggerV3::Page
|
633
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
634
|
+
command.params['pageId'] = page_id unless page_id.nil?
|
635
|
+
command.query['publish'] = publish unless publish.nil?
|
636
|
+
command.query['revert'] = revert unless revert.nil?
|
637
|
+
command.query['fields'] = fields unless fields.nil?
|
638
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
639
|
+
execute_or_queue_command(command, &block)
|
640
|
+
end
|
641
|
+
|
642
|
+
# Publishes a page.
|
643
|
+
# @param [String] blog_id
|
644
|
+
# @param [String] page_id
|
645
|
+
# @param [String] fields
|
646
|
+
# Selector specifying which fields to include in a partial response.
|
647
|
+
# @param [String] quota_user
|
648
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
649
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
650
|
+
# @param [Google::Apis::RequestOptions] options
|
651
|
+
# Request-specific options
|
652
|
+
#
|
653
|
+
# @yield [result, err] Result & error if block supplied
|
654
|
+
# @yieldparam result [Google::Apis::BloggerV3::Page] parsed result object
|
655
|
+
# @yieldparam err [StandardError] error object if request failed
|
656
|
+
#
|
657
|
+
# @return [Google::Apis::BloggerV3::Page]
|
658
|
+
#
|
659
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
660
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
661
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
662
|
+
def publish_page(blog_id, page_id, fields: nil, quota_user: nil, options: nil, &block)
|
663
|
+
command = make_simple_command(:post, 'v3/blogs/{blogId}/pages/{pageId}/publish', options)
|
664
|
+
command.response_representation = Google::Apis::BloggerV3::Page::Representation
|
665
|
+
command.response_class = Google::Apis::BloggerV3::Page
|
666
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
667
|
+
command.params['pageId'] = page_id unless page_id.nil?
|
668
|
+
command.query['fields'] = fields unless fields.nil?
|
669
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
670
|
+
execute_or_queue_command(command, &block)
|
671
|
+
end
|
672
|
+
|
673
|
+
# Reverts a published or scheduled page to draft state.
|
674
|
+
# @param [String] blog_id
|
675
|
+
# @param [String] page_id
|
676
|
+
# @param [String] fields
|
677
|
+
# Selector specifying which fields to include in a partial response.
|
678
|
+
# @param [String] quota_user
|
679
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
680
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
681
|
+
# @param [Google::Apis::RequestOptions] options
|
682
|
+
# Request-specific options
|
683
|
+
#
|
684
|
+
# @yield [result, err] Result & error if block supplied
|
685
|
+
# @yieldparam result [Google::Apis::BloggerV3::Page] parsed result object
|
686
|
+
# @yieldparam err [StandardError] error object if request failed
|
687
|
+
#
|
688
|
+
# @return [Google::Apis::BloggerV3::Page]
|
689
|
+
#
|
690
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
691
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
692
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
693
|
+
def revert_page(blog_id, page_id, fields: nil, quota_user: nil, options: nil, &block)
|
694
|
+
command = make_simple_command(:post, 'v3/blogs/{blogId}/pages/{pageId}/revert', options)
|
695
|
+
command.response_representation = Google::Apis::BloggerV3::Page::Representation
|
696
|
+
command.response_class = Google::Apis::BloggerV3::Page
|
697
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
698
|
+
command.params['pageId'] = page_id unless page_id.nil?
|
699
|
+
command.query['fields'] = fields unless fields.nil?
|
700
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
701
|
+
execute_or_queue_command(command, &block)
|
702
|
+
end
|
703
|
+
|
704
|
+
# Updates a page by blog id and page id.
|
705
|
+
# @param [String] blog_id
|
706
|
+
# @param [String] page_id
|
707
|
+
# @param [Google::Apis::BloggerV3::Page] page_object
|
708
|
+
# @param [Boolean] publish
|
709
|
+
# @param [Boolean] revert
|
710
|
+
# @param [String] fields
|
711
|
+
# Selector specifying which fields to include in a partial response.
|
712
|
+
# @param [String] quota_user
|
713
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
714
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
715
|
+
# @param [Google::Apis::RequestOptions] options
|
716
|
+
# Request-specific options
|
717
|
+
#
|
718
|
+
# @yield [result, err] Result & error if block supplied
|
719
|
+
# @yieldparam result [Google::Apis::BloggerV3::Page] parsed result object
|
720
|
+
# @yieldparam err [StandardError] error object if request failed
|
721
|
+
#
|
722
|
+
# @return [Google::Apis::BloggerV3::Page]
|
723
|
+
#
|
724
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
725
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
726
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
727
|
+
def update_page(blog_id, page_id, page_object = nil, publish: nil, revert: nil, fields: nil, quota_user: nil, options: nil, &block)
|
728
|
+
command = make_simple_command(:put, 'v3/blogs/{blogId}/pages/{pageId}', options)
|
729
|
+
command.request_representation = Google::Apis::BloggerV3::Page::Representation
|
730
|
+
command.request_object = page_object
|
731
|
+
command.response_representation = Google::Apis::BloggerV3::Page::Representation
|
732
|
+
command.response_class = Google::Apis::BloggerV3::Page
|
733
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
734
|
+
command.params['pageId'] = page_id unless page_id.nil?
|
735
|
+
command.query['publish'] = publish unless publish.nil?
|
736
|
+
command.query['revert'] = revert unless revert.nil?
|
737
|
+
command.query['fields'] = fields unless fields.nil?
|
738
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
739
|
+
execute_or_queue_command(command, &block)
|
740
|
+
end
|
741
|
+
|
742
|
+
# Gets one post and user info pair, by post_id and user_id.
|
743
|
+
# @param [String] user_id
|
744
|
+
# @param [String] blog_id
|
745
|
+
# @param [String] post_id
|
746
|
+
# @param [Fixnum] max_comments
|
747
|
+
# @param [String] fields
|
748
|
+
# Selector specifying which fields to include in a partial response.
|
749
|
+
# @param [String] quota_user
|
750
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
751
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
752
|
+
# @param [Google::Apis::RequestOptions] options
|
753
|
+
# Request-specific options
|
754
|
+
#
|
755
|
+
# @yield [result, err] Result & error if block supplied
|
756
|
+
# @yieldparam result [Google::Apis::BloggerV3::PostUserInfo] parsed result object
|
757
|
+
# @yieldparam err [StandardError] error object if request failed
|
758
|
+
#
|
759
|
+
# @return [Google::Apis::BloggerV3::PostUserInfo]
|
760
|
+
#
|
761
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
762
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
763
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
764
|
+
def get_post_user_info(user_id, blog_id, post_id, max_comments: nil, fields: nil, quota_user: nil, options: nil, &block)
|
765
|
+
command = make_simple_command(:get, 'v3/users/{userId}/blogs/{blogId}/posts/{postId}', options)
|
766
|
+
command.response_representation = Google::Apis::BloggerV3::PostUserInfo::Representation
|
767
|
+
command.response_class = Google::Apis::BloggerV3::PostUserInfo
|
768
|
+
command.params['userId'] = user_id unless user_id.nil?
|
769
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
770
|
+
command.params['postId'] = post_id unless post_id.nil?
|
771
|
+
command.query['maxComments'] = max_comments unless max_comments.nil?
|
772
|
+
command.query['fields'] = fields unless fields.nil?
|
773
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
774
|
+
execute_or_queue_command(command, &block)
|
775
|
+
end
|
776
|
+
|
777
|
+
# Lists post and user info pairs.
|
778
|
+
# @param [String] user_id
|
779
|
+
# @param [String] blog_id
|
780
|
+
# @param [String] end_date
|
781
|
+
# @param [Boolean] fetch_bodies
|
782
|
+
# @param [String] labels
|
783
|
+
# @param [Fixnum] max_results
|
784
|
+
# @param [String] order_by
|
785
|
+
# @param [String] page_token
|
786
|
+
# @param [String] start_date
|
787
|
+
# @param [Array<String>, String] status
|
788
|
+
# @param [String] view
|
789
|
+
# @param [String] fields
|
790
|
+
# Selector specifying which fields to include in a partial response.
|
791
|
+
# @param [String] quota_user
|
792
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
793
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
794
|
+
# @param [Google::Apis::RequestOptions] options
|
795
|
+
# Request-specific options
|
796
|
+
#
|
797
|
+
# @yield [result, err] Result & error if block supplied
|
798
|
+
# @yieldparam result [Google::Apis::BloggerV3::PostUserInfosList] parsed result object
|
799
|
+
# @yieldparam err [StandardError] error object if request failed
|
800
|
+
#
|
801
|
+
# @return [Google::Apis::BloggerV3::PostUserInfosList]
|
802
|
+
#
|
803
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
804
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
805
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
806
|
+
def list_post_user_info(user_id, blog_id, end_date: nil, fetch_bodies: nil, labels: nil, max_results: nil, order_by: nil, page_token: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
807
|
+
command = make_simple_command(:get, 'v3/users/{userId}/blogs/{blogId}/posts', options)
|
808
|
+
command.response_representation = Google::Apis::BloggerV3::PostUserInfosList::Representation
|
809
|
+
command.response_class = Google::Apis::BloggerV3::PostUserInfosList
|
810
|
+
command.params['userId'] = user_id unless user_id.nil?
|
811
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
812
|
+
command.query['endDate'] = end_date unless end_date.nil?
|
813
|
+
command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
|
814
|
+
command.query['labels'] = labels unless labels.nil?
|
815
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
816
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
817
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
818
|
+
command.query['startDate'] = start_date unless start_date.nil?
|
819
|
+
command.query['status'] = status unless status.nil?
|
820
|
+
command.query['view'] = view unless view.nil?
|
821
|
+
command.query['fields'] = fields unless fields.nil?
|
822
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
823
|
+
execute_or_queue_command(command, &block)
|
824
|
+
end
|
825
|
+
|
826
|
+
# Deletes a post by blog id and post id.
|
827
|
+
# @param [String] blog_id
|
828
|
+
# @param [String] post_id
|
829
|
+
# @param [String] fields
|
830
|
+
# Selector specifying which fields to include in a partial response.
|
831
|
+
# @param [String] quota_user
|
832
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
833
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
834
|
+
# @param [Google::Apis::RequestOptions] options
|
835
|
+
# Request-specific options
|
836
|
+
#
|
837
|
+
# @yield [result, err] Result & error if block supplied
|
838
|
+
# @yieldparam result [NilClass] No result returned for this method
|
839
|
+
# @yieldparam err [StandardError] error object if request failed
|
840
|
+
#
|
841
|
+
# @return [void]
|
842
|
+
#
|
843
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
844
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
845
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
846
|
+
def delete_post(blog_id, post_id, fields: nil, quota_user: nil, options: nil, &block)
|
847
|
+
command = make_simple_command(:delete, 'v3/blogs/{blogId}/posts/{postId}', options)
|
848
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
849
|
+
command.params['postId'] = post_id unless post_id.nil?
|
850
|
+
command.query['fields'] = fields unless fields.nil?
|
851
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
852
|
+
execute_or_queue_command(command, &block)
|
853
|
+
end
|
854
|
+
|
855
|
+
# Gets a post by blog id and post id
|
856
|
+
# @param [String] blog_id
|
857
|
+
# @param [String] post_id
|
858
|
+
# @param [Boolean] fetch_body
|
859
|
+
# @param [Boolean] fetch_images
|
860
|
+
# @param [Fixnum] max_comments
|
861
|
+
# @param [String] view
|
862
|
+
# @param [String] fields
|
863
|
+
# Selector specifying which fields to include in a partial response.
|
864
|
+
# @param [String] quota_user
|
865
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
866
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
867
|
+
# @param [Google::Apis::RequestOptions] options
|
868
|
+
# Request-specific options
|
869
|
+
#
|
870
|
+
# @yield [result, err] Result & error if block supplied
|
871
|
+
# @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
|
872
|
+
# @yieldparam err [StandardError] error object if request failed
|
873
|
+
#
|
874
|
+
# @return [Google::Apis::BloggerV3::Post]
|
875
|
+
#
|
876
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
877
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
878
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
879
|
+
def get_post(blog_id, post_id, fetch_body: nil, fetch_images: nil, max_comments: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
880
|
+
command = make_simple_command(:get, 'v3/blogs/{blogId}/posts/{postId}', options)
|
881
|
+
command.response_representation = Google::Apis::BloggerV3::Post::Representation
|
882
|
+
command.response_class = Google::Apis::BloggerV3::Post
|
883
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
884
|
+
command.params['postId'] = post_id unless post_id.nil?
|
885
|
+
command.query['fetchBody'] = fetch_body unless fetch_body.nil?
|
886
|
+
command.query['fetchImages'] = fetch_images unless fetch_images.nil?
|
887
|
+
command.query['maxComments'] = max_comments unless max_comments.nil?
|
888
|
+
command.query['view'] = view unless view.nil?
|
889
|
+
command.query['fields'] = fields unless fields.nil?
|
890
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
891
|
+
execute_or_queue_command(command, &block)
|
892
|
+
end
|
893
|
+
|
894
|
+
# Gets a post by path.
|
895
|
+
# @param [String] blog_id
|
896
|
+
# @param [String] path
|
897
|
+
# @param [Fixnum] max_comments
|
898
|
+
# @param [String] view
|
899
|
+
# @param [String] fields
|
900
|
+
# Selector specifying which fields to include in a partial response.
|
901
|
+
# @param [String] quota_user
|
902
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
903
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
904
|
+
# @param [Google::Apis::RequestOptions] options
|
905
|
+
# Request-specific options
|
906
|
+
#
|
907
|
+
# @yield [result, err] Result & error if block supplied
|
908
|
+
# @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
|
909
|
+
# @yieldparam err [StandardError] error object if request failed
|
910
|
+
#
|
911
|
+
# @return [Google::Apis::BloggerV3::Post]
|
912
|
+
#
|
913
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
914
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
915
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
916
|
+
def get_post_by_path(blog_id, path, max_comments: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
917
|
+
command = make_simple_command(:get, 'v3/blogs/{blogId}/posts/bypath', options)
|
918
|
+
command.response_representation = Google::Apis::BloggerV3::Post::Representation
|
919
|
+
command.response_class = Google::Apis::BloggerV3::Post
|
920
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
921
|
+
command.query['maxComments'] = max_comments unless max_comments.nil?
|
922
|
+
command.query['path'] = path unless path.nil?
|
923
|
+
command.query['view'] = view unless view.nil?
|
924
|
+
command.query['fields'] = fields unless fields.nil?
|
925
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
926
|
+
execute_or_queue_command(command, &block)
|
927
|
+
end
|
928
|
+
|
929
|
+
# Inserts a post.
|
930
|
+
# @param [String] blog_id
|
931
|
+
# @param [Google::Apis::BloggerV3::Post] post_object
|
932
|
+
# @param [Boolean] fetch_body
|
933
|
+
# @param [Boolean] fetch_images
|
934
|
+
# @param [Boolean] is_draft
|
935
|
+
# @param [String] fields
|
936
|
+
# Selector specifying which fields to include in a partial response.
|
937
|
+
# @param [String] quota_user
|
938
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
939
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
940
|
+
# @param [Google::Apis::RequestOptions] options
|
941
|
+
# Request-specific options
|
942
|
+
#
|
943
|
+
# @yield [result, err] Result & error if block supplied
|
944
|
+
# @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
|
945
|
+
# @yieldparam err [StandardError] error object if request failed
|
946
|
+
#
|
947
|
+
# @return [Google::Apis::BloggerV3::Post]
|
948
|
+
#
|
949
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
950
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
951
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
952
|
+
def insert_post(blog_id, post_object = nil, fetch_body: nil, fetch_images: nil, is_draft: nil, fields: nil, quota_user: nil, options: nil, &block)
|
953
|
+
command = make_simple_command(:post, 'v3/blogs/{blogId}/posts', options)
|
954
|
+
command.request_representation = Google::Apis::BloggerV3::Post::Representation
|
955
|
+
command.request_object = post_object
|
956
|
+
command.response_representation = Google::Apis::BloggerV3::Post::Representation
|
957
|
+
command.response_class = Google::Apis::BloggerV3::Post
|
958
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
959
|
+
command.query['fetchBody'] = fetch_body unless fetch_body.nil?
|
960
|
+
command.query['fetchImages'] = fetch_images unless fetch_images.nil?
|
961
|
+
command.query['isDraft'] = is_draft unless is_draft.nil?
|
962
|
+
command.query['fields'] = fields unless fields.nil?
|
963
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
964
|
+
execute_or_queue_command(command, &block)
|
965
|
+
end
|
966
|
+
|
967
|
+
# Lists posts.
|
968
|
+
# @param [String] blog_id
|
969
|
+
# @param [String] end_date
|
970
|
+
# @param [Boolean] fetch_bodies
|
971
|
+
# @param [Boolean] fetch_images
|
972
|
+
# @param [String] labels
|
973
|
+
# @param [Fixnum] max_results
|
974
|
+
# @param [String] order_by
|
975
|
+
# @param [String] page_token
|
976
|
+
# @param [String] start_date
|
977
|
+
# @param [Array<String>, String] status
|
978
|
+
# @param [String] view
|
979
|
+
# @param [String] fields
|
980
|
+
# Selector specifying which fields to include in a partial response.
|
981
|
+
# @param [String] quota_user
|
982
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
983
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
984
|
+
# @param [Google::Apis::RequestOptions] options
|
985
|
+
# Request-specific options
|
986
|
+
#
|
987
|
+
# @yield [result, err] Result & error if block supplied
|
988
|
+
# @yieldparam result [Google::Apis::BloggerV3::PostList] parsed result object
|
989
|
+
# @yieldparam err [StandardError] error object if request failed
|
990
|
+
#
|
991
|
+
# @return [Google::Apis::BloggerV3::PostList]
|
992
|
+
#
|
993
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
994
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
995
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
996
|
+
def list_posts(blog_id, end_date: nil, fetch_bodies: nil, fetch_images: nil, labels: nil, max_results: nil, order_by: nil, page_token: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
997
|
+
command = make_simple_command(:get, 'v3/blogs/{blogId}/posts', options)
|
998
|
+
command.response_representation = Google::Apis::BloggerV3::PostList::Representation
|
999
|
+
command.response_class = Google::Apis::BloggerV3::PostList
|
1000
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
1001
|
+
command.query['endDate'] = end_date unless end_date.nil?
|
1002
|
+
command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
|
1003
|
+
command.query['fetchImages'] = fetch_images unless fetch_images.nil?
|
1004
|
+
command.query['labels'] = labels unless labels.nil?
|
1005
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1006
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
1007
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1008
|
+
command.query['startDate'] = start_date unless start_date.nil?
|
1009
|
+
command.query['status'] = status unless status.nil?
|
1010
|
+
command.query['view'] = view unless view.nil?
|
1011
|
+
command.query['fields'] = fields unless fields.nil?
|
1012
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1013
|
+
execute_or_queue_command(command, &block)
|
1014
|
+
end
|
1015
|
+
|
1016
|
+
# Patches a post.
|
1017
|
+
# @param [String] blog_id
|
1018
|
+
# @param [String] post_id
|
1019
|
+
# @param [Google::Apis::BloggerV3::Post] post_object
|
1020
|
+
# @param [Boolean] fetch_body
|
1021
|
+
# @param [Boolean] fetch_images
|
1022
|
+
# @param [Fixnum] max_comments
|
1023
|
+
# @param [Boolean] publish
|
1024
|
+
# @param [Boolean] revert
|
1025
|
+
# @param [String] fields
|
1026
|
+
# Selector specifying which fields to include in a partial response.
|
1027
|
+
# @param [String] quota_user
|
1028
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1029
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1030
|
+
# @param [Google::Apis::RequestOptions] options
|
1031
|
+
# Request-specific options
|
1032
|
+
#
|
1033
|
+
# @yield [result, err] Result & error if block supplied
|
1034
|
+
# @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
|
1035
|
+
# @yieldparam err [StandardError] error object if request failed
|
1036
|
+
#
|
1037
|
+
# @return [Google::Apis::BloggerV3::Post]
|
1038
|
+
#
|
1039
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1040
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1041
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1042
|
+
def patch_post(blog_id, post_id, post_object = nil, fetch_body: nil, fetch_images: nil, max_comments: nil, publish: nil, revert: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1043
|
+
command = make_simple_command(:patch, 'v3/blogs/{blogId}/posts/{postId}', options)
|
1044
|
+
command.request_representation = Google::Apis::BloggerV3::Post::Representation
|
1045
|
+
command.request_object = post_object
|
1046
|
+
command.response_representation = Google::Apis::BloggerV3::Post::Representation
|
1047
|
+
command.response_class = Google::Apis::BloggerV3::Post
|
1048
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
1049
|
+
command.params['postId'] = post_id unless post_id.nil?
|
1050
|
+
command.query['fetchBody'] = fetch_body unless fetch_body.nil?
|
1051
|
+
command.query['fetchImages'] = fetch_images unless fetch_images.nil?
|
1052
|
+
command.query['maxComments'] = max_comments unless max_comments.nil?
|
1053
|
+
command.query['publish'] = publish unless publish.nil?
|
1054
|
+
command.query['revert'] = revert unless revert.nil?
|
1055
|
+
command.query['fields'] = fields unless fields.nil?
|
1056
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1057
|
+
execute_or_queue_command(command, &block)
|
1058
|
+
end
|
1059
|
+
|
1060
|
+
# Publishes a post.
|
1061
|
+
# @param [String] blog_id
|
1062
|
+
# @param [String] post_id
|
1063
|
+
# @param [String] publish_date
|
1064
|
+
# @param [String] fields
|
1065
|
+
# Selector specifying which fields to include in a partial response.
|
1066
|
+
# @param [String] quota_user
|
1067
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1068
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1069
|
+
# @param [Google::Apis::RequestOptions] options
|
1070
|
+
# Request-specific options
|
1071
|
+
#
|
1072
|
+
# @yield [result, err] Result & error if block supplied
|
1073
|
+
# @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
|
1074
|
+
# @yieldparam err [StandardError] error object if request failed
|
1075
|
+
#
|
1076
|
+
# @return [Google::Apis::BloggerV3::Post]
|
1077
|
+
#
|
1078
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1079
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1080
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1081
|
+
def publish_post(blog_id, post_id, publish_date: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1082
|
+
command = make_simple_command(:post, 'v3/blogs/{blogId}/posts/{postId}/publish', options)
|
1083
|
+
command.response_representation = Google::Apis::BloggerV3::Post::Representation
|
1084
|
+
command.response_class = Google::Apis::BloggerV3::Post
|
1085
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
1086
|
+
command.params['postId'] = post_id unless post_id.nil?
|
1087
|
+
command.query['publishDate'] = publish_date unless publish_date.nil?
|
1088
|
+
command.query['fields'] = fields unless fields.nil?
|
1089
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1090
|
+
execute_or_queue_command(command, &block)
|
1091
|
+
end
|
1092
|
+
|
1093
|
+
# Reverts a published or scheduled post to draft state.
|
1094
|
+
# @param [String] blog_id
|
1095
|
+
# @param [String] post_id
|
1096
|
+
# @param [String] fields
|
1097
|
+
# Selector specifying which fields to include in a partial response.
|
1098
|
+
# @param [String] quota_user
|
1099
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1100
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1101
|
+
# @param [Google::Apis::RequestOptions] options
|
1102
|
+
# Request-specific options
|
1103
|
+
#
|
1104
|
+
# @yield [result, err] Result & error if block supplied
|
1105
|
+
# @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
|
1106
|
+
# @yieldparam err [StandardError] error object if request failed
|
1107
|
+
#
|
1108
|
+
# @return [Google::Apis::BloggerV3::Post]
|
1109
|
+
#
|
1110
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1111
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1112
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1113
|
+
def revert_post(blog_id, post_id, fields: nil, quota_user: nil, options: nil, &block)
|
1114
|
+
command = make_simple_command(:post, 'v3/blogs/{blogId}/posts/{postId}/revert', options)
|
1115
|
+
command.response_representation = Google::Apis::BloggerV3::Post::Representation
|
1116
|
+
command.response_class = Google::Apis::BloggerV3::Post
|
1117
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
1118
|
+
command.params['postId'] = post_id unless post_id.nil?
|
1119
|
+
command.query['fields'] = fields unless fields.nil?
|
1120
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1121
|
+
execute_or_queue_command(command, &block)
|
1122
|
+
end
|
1123
|
+
|
1124
|
+
# Searches for posts matching given query terms in the specified blog.
|
1125
|
+
# @param [String] blog_id
|
1126
|
+
# @param [String] q
|
1127
|
+
# @param [Boolean] fetch_bodies
|
1128
|
+
# @param [String] order_by
|
1129
|
+
# @param [String] fields
|
1130
|
+
# Selector specifying which fields to include in a partial response.
|
1131
|
+
# @param [String] quota_user
|
1132
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1133
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1134
|
+
# @param [Google::Apis::RequestOptions] options
|
1135
|
+
# Request-specific options
|
1136
|
+
#
|
1137
|
+
# @yield [result, err] Result & error if block supplied
|
1138
|
+
# @yieldparam result [Google::Apis::BloggerV3::PostList] parsed result object
|
1139
|
+
# @yieldparam err [StandardError] error object if request failed
|
1140
|
+
#
|
1141
|
+
# @return [Google::Apis::BloggerV3::PostList]
|
1142
|
+
#
|
1143
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1144
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1145
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1146
|
+
def search_posts(blog_id, q, fetch_bodies: nil, order_by: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1147
|
+
command = make_simple_command(:get, 'v3/blogs/{blogId}/posts/search', options)
|
1148
|
+
command.response_representation = Google::Apis::BloggerV3::PostList::Representation
|
1149
|
+
command.response_class = Google::Apis::BloggerV3::PostList
|
1150
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
1151
|
+
command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
|
1152
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
1153
|
+
command.query['q'] = q unless q.nil?
|
1154
|
+
command.query['fields'] = fields unless fields.nil?
|
1155
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1156
|
+
execute_or_queue_command(command, &block)
|
1157
|
+
end
|
1158
|
+
|
1159
|
+
# Updates a post by blog id and post id.
|
1160
|
+
# @param [String] blog_id
|
1161
|
+
# @param [String] post_id
|
1162
|
+
# @param [Google::Apis::BloggerV3::Post] post_object
|
1163
|
+
# @param [Boolean] fetch_body
|
1164
|
+
# @param [Boolean] fetch_images
|
1165
|
+
# @param [Fixnum] max_comments
|
1166
|
+
# @param [Boolean] publish
|
1167
|
+
# @param [Boolean] revert
|
1168
|
+
# @param [String] fields
|
1169
|
+
# Selector specifying which fields to include in a partial response.
|
1170
|
+
# @param [String] quota_user
|
1171
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1172
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1173
|
+
# @param [Google::Apis::RequestOptions] options
|
1174
|
+
# Request-specific options
|
1175
|
+
#
|
1176
|
+
# @yield [result, err] Result & error if block supplied
|
1177
|
+
# @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object
|
1178
|
+
# @yieldparam err [StandardError] error object if request failed
|
1179
|
+
#
|
1180
|
+
# @return [Google::Apis::BloggerV3::Post]
|
1181
|
+
#
|
1182
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1183
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1184
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1185
|
+
def update_post(blog_id, post_id, post_object = nil, fetch_body: nil, fetch_images: nil, max_comments: nil, publish: nil, revert: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1186
|
+
command = make_simple_command(:put, 'v3/blogs/{blogId}/posts/{postId}', options)
|
1187
|
+
command.request_representation = Google::Apis::BloggerV3::Post::Representation
|
1188
|
+
command.request_object = post_object
|
1189
|
+
command.response_representation = Google::Apis::BloggerV3::Post::Representation
|
1190
|
+
command.response_class = Google::Apis::BloggerV3::Post
|
1191
|
+
command.params['blogId'] = blog_id unless blog_id.nil?
|
1192
|
+
command.params['postId'] = post_id unless post_id.nil?
|
1193
|
+
command.query['fetchBody'] = fetch_body unless fetch_body.nil?
|
1194
|
+
command.query['fetchImages'] = fetch_images unless fetch_images.nil?
|
1195
|
+
command.query['maxComments'] = max_comments unless max_comments.nil?
|
1196
|
+
command.query['publish'] = publish unless publish.nil?
|
1197
|
+
command.query['revert'] = revert unless revert.nil?
|
1198
|
+
command.query['fields'] = fields unless fields.nil?
|
1199
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1200
|
+
execute_or_queue_command(command, &block)
|
1201
|
+
end
|
1202
|
+
|
1203
|
+
# Gets one user by user_id.
|
1204
|
+
# @param [String] user_id
|
1205
|
+
# @param [String] fields
|
1206
|
+
# Selector specifying which fields to include in a partial response.
|
1207
|
+
# @param [String] quota_user
|
1208
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1209
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1210
|
+
# @param [Google::Apis::RequestOptions] options
|
1211
|
+
# Request-specific options
|
1212
|
+
#
|
1213
|
+
# @yield [result, err] Result & error if block supplied
|
1214
|
+
# @yieldparam result [Google::Apis::BloggerV3::User] parsed result object
|
1215
|
+
# @yieldparam err [StandardError] error object if request failed
|
1216
|
+
#
|
1217
|
+
# @return [Google::Apis::BloggerV3::User]
|
1218
|
+
#
|
1219
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1220
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1221
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1222
|
+
def get_user(user_id, fields: nil, quota_user: nil, options: nil, &block)
|
1223
|
+
command = make_simple_command(:get, 'v3/users/{userId}', options)
|
1224
|
+
command.response_representation = Google::Apis::BloggerV3::User::Representation
|
1225
|
+
command.response_class = Google::Apis::BloggerV3::User
|
1226
|
+
command.params['userId'] = user_id unless user_id.nil?
|
1227
|
+
command.query['fields'] = fields unless fields.nil?
|
1228
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1229
|
+
execute_or_queue_command(command, &block)
|
1230
|
+
end
|
1231
|
+
|
1232
|
+
protected
|
1233
|
+
|
1234
|
+
def apply_command_defaults(command)
|
1235
|
+
command.query['key'] = key unless key.nil?
|
1236
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1237
|
+
end
|
1238
|
+
end
|
1239
|
+
end
|
1240
|
+
end
|
1241
|
+
end
|