Class: Google::Apis::BloggerV3::BloggerService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/blogger_v3/service.rb

Overview

Blogger API

The Blogger API provides access to posts, comments and pages of a Blogger blog.

Examples:

require 'google/apis/blogger_v3'

Blogger = Google::Apis::BloggerV3 # Alias the module
service = Blogger::BloggerService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://blogger.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBloggerService

Returns a new instance of BloggerService.



47
48
49
50
51
52
# File 'lib/google/apis/blogger_v3/service.rb', line 47

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-blogger_v3',
        client_version: Google::Apis::BloggerV3::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



40
41
42
# File 'lib/google/apis/blogger_v3/service.rb', line 40

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



45
46
47
# File 'lib/google/apis/blogger_v3/service.rb', line 45

def quota_user
  @quota_user
end

Instance Method Details

#approve_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Comment

Marks a comment as not spam by blog id, post id and comment id.

Parameters:

  • blog_id (String)
  • post_id (String)
  • comment_id (String)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



210
211
212
213
214
215
216
217
218
219
220
# File 'lib/google/apis/blogger_v3/service.rb', line 210

def approve_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/approve', options)
  command.response_representation = Google::Apis::BloggerV3::Comment::Representation
  command.response_class = Google::Apis::BloggerV3::Comment
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['postId'] = post_id unless post_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a comment by blog id, post id and comment id.

Parameters:

  • blog_id (String)
  • post_id (String)
  • comment_id (String)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



243
244
245
246
247
248
249
250
251
# File 'lib/google/apis/blogger_v3/service.rb', line 243

def delete_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}', options)
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['postId'] = post_id unless post_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_page(blog_id, page_id, use_trash: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a page by blog id and page id.

Parameters:

  • blog_id (String)
  • page_id (String)
  • use_trash (Boolean) (defaults to: nil)

    Move to Trash if possible

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



493
494
495
496
497
498
499
500
501
# File 'lib/google/apis/blogger_v3/service.rb', line 493

def delete_page(blog_id, page_id, use_trash: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v3/blogs/{blogId}/pages/{pageId}', options)
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['pageId'] = page_id unless page_id.nil?
  command.query['useTrash'] = use_trash unless use_trash.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_post(blog_id, post_id, use_trash: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a post by blog id and post id.

Parameters:

  • blog_id (String)
  • post_id (String)
  • use_trash (Boolean) (defaults to: nil)

    Move to Trash if possible

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



853
854
855
856
857
858
859
860
861
# File 'lib/google/apis/blogger_v3/service.rb', line 853

def delete_post(blog_id, post_id, use_trash: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v3/blogs/{blogId}/posts/{postId}', options)
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['postId'] = post_id unless post_id.nil?
  command.query['useTrash'] = use_trash unless use_trash.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_blog(blog_id, max_posts: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Blog

Gets a blog by id.

Parameters:

  • blog_id (String)
  • max_posts (Fixnum) (defaults to: nil)
  • view (String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



108
109
110
111
112
113
114
115
116
117
118
# File 'lib/google/apis/blogger_v3/service.rb', line 108

def get_blog(blog_id, max_posts: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v3/blogs/{blogId}', options)
  command.response_representation = Google::Apis::BloggerV3::Blog::Representation
  command.response_class = Google::Apis::BloggerV3::Blog
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.query['maxPosts'] = max_posts unless max_posts.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_blog_by_url(url, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Blog

Gets a blog by url.

Parameters:

  • url (String)
  • view (String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



140
141
142
143
144
145
146
147
148
149
# File 'lib/google/apis/blogger_v3/service.rb', line 140

def get_blog_by_url(url, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v3/blogs/byurl', options)
  command.response_representation = Google::Apis::BloggerV3::Blog::Representation
  command.response_class = Google::Apis::BloggerV3::Blog
  command.query['url'] = url unless url.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_blog_user_info(user_id, blog_id, max_posts: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::BlogUserInfo

Gets one blog and user info pair by blog id and user id.

Parameters:

  • user_id (String)
  • blog_id (String)
  • max_posts (Fixnum) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



75
76
77
78
79
80
81
82
83
84
85
# File 'lib/google/apis/blogger_v3/service.rb', line 75

def (user_id, blog_id, max_posts: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v3/users/{userId}/blogs/{blogId}', options)
  command.response_representation = Google::Apis::BloggerV3::BlogUserInfo::Representation
  command.response_class = Google::Apis::BloggerV3::BlogUserInfo
  command.params['userId'] = user_id unless user_id.nil?
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.query['maxPosts'] = max_posts unless max_posts.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_comment(blog_id, post_id, comment_id, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Comment

Gets a comment by id.

Parameters:

  • blog_id (String)
  • post_id (String)
  • comment_id (String)
  • view (String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/google/apis/blogger_v3/service.rb', line 275

def get_comment(blog_id, post_id, comment_id, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}', options)
  command.response_representation = Google::Apis::BloggerV3::Comment::Representation
  command.response_class = Google::Apis::BloggerV3::Comment
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['postId'] = post_id unless post_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_page(blog_id, page_id, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Page

Gets a page by blog id and page id.

Parameters:

  • blog_id (String)
  • page_id (String)
  • view (String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



524
525
526
527
528
529
530
531
532
533
534
# File 'lib/google/apis/blogger_v3/service.rb', line 524

def get_page(blog_id, page_id, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v3/blogs/{blogId}/pages/{pageId}', options)
  command.response_representation = Google::Apis::BloggerV3::Page::Representation
  command.response_class = Google::Apis::BloggerV3::Page
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['pageId'] = page_id unless page_id.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_page_view(blog_id, range: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Pageviews

Gets page views by blog id.

Parameters:

  • blog_id (String)
  • range (Array<String>, String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



460
461
462
463
464
465
466
467
468
469
# File 'lib/google/apis/blogger_v3/service.rb', line 460

def get_page_view(blog_id, range: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v3/blogs/{blogId}/pageviews', options)
  command.response_representation = Google::Apis::BloggerV3::Pageviews::Representation
  command.response_class = Google::Apis::BloggerV3::Pageviews
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.query['range'] = range unless range.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_post(blog_id, post_id, fetch_body: nil, fetch_images: nil, max_comments: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Post

Gets a post by blog id and post id

Parameters:

  • blog_id (String)
  • post_id (String)
  • fetch_body (Boolean) (defaults to: nil)
  • fetch_images (Boolean) (defaults to: nil)
  • max_comments (Fixnum) (defaults to: nil)
  • view (String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



887
888
889
890
891
892
893
894
895
896
897
898
899
900
# File 'lib/google/apis/blogger_v3/service.rb', line 887

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)
  command = make_simple_command(:get, 'v3/blogs/{blogId}/posts/{postId}', options)
  command.response_representation = Google::Apis::BloggerV3::Post::Representation
  command.response_class = Google::Apis::BloggerV3::Post
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['postId'] = post_id unless post_id.nil?
  command.query['fetchBody'] = fetch_body unless fetch_body.nil?
  command.query['fetchImages'] = fetch_images unless fetch_images.nil?
  command.query['maxComments'] = max_comments unless max_comments.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_post_by_path(blog_id, path, max_comments: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Post

Gets a post by path.

Parameters:

  • blog_id (String)
  • path (String)
  • max_comments (Fixnum) (defaults to: nil)
  • view (String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



924
925
926
927
928
929
930
931
932
933
934
935
# File 'lib/google/apis/blogger_v3/service.rb', line 924

def get_post_by_path(blog_id, path, max_comments: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v3/blogs/{blogId}/posts/bypath', options)
  command.response_representation = Google::Apis::BloggerV3::Post::Representation
  command.response_class = Google::Apis::BloggerV3::Post
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.query['maxComments'] = max_comments unless max_comments.nil?
  command.query['path'] = path unless path.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_post_user_info(user_id, blog_id, post_id, max_comments: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::PostUserInfo

Gets one post and user info pair, by post_id and user_id.

Parameters:

  • user_id (String)
  • blog_id (String)
  • post_id (String)
  • max_comments (Fixnum) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



769
770
771
772
773
774
775
776
777
778
779
780
# File 'lib/google/apis/blogger_v3/service.rb', line 769

def (user_id, blog_id, post_id, max_comments: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v3/users/{userId}/blogs/{blogId}/posts/{postId}', options)
  command.response_representation = Google::Apis::BloggerV3::PostUserInfo::Representation
  command.response_class = Google::Apis::BloggerV3::PostUserInfo
  command.params['userId'] = user_id unless user_id.nil?
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['postId'] = post_id unless post_id.nil?
  command.query['maxComments'] = max_comments unless max_comments.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_user(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::User

Gets one user by user_id.

Parameters:

  • user_id (String)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1233
1234
1235
1236
1237
1238
1239
1240
1241
# File 'lib/google/apis/blogger_v3/service.rb', line 1233

def get_user(user_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v3/users/{userId}', options)
  command.response_representation = Google::Apis::BloggerV3::User::Representation
  command.response_class = Google::Apis::BloggerV3::User
  command.params['userId'] = user_id unless user_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_page(blog_id, page_object = nil, is_draft: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Page

Inserts a page.

Parameters:

  • blog_id (String)
  • page_object (Google::Apis::BloggerV3::Page) (defaults to: nil)
  • is_draft (Boolean) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



557
558
559
560
561
562
563
564
565
566
567
568
# File 'lib/google/apis/blogger_v3/service.rb', line 557

def insert_page(blog_id, page_object = nil, is_draft: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v3/blogs/{blogId}/pages', options)
  command.request_representation = Google::Apis::BloggerV3::Page::Representation
  command.request_object = page_object
  command.response_representation = Google::Apis::BloggerV3::Page::Representation
  command.response_class = Google::Apis::BloggerV3::Page
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.query['isDraft'] = is_draft unless is_draft.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_post(blog_id, post_object = nil, fetch_body: nil, fetch_images: nil, is_draft: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Post

Inserts a post.

Parameters:

  • blog_id (String)
  • post_object (Google::Apis::BloggerV3::Post) (defaults to: nil)
  • fetch_body (Boolean) (defaults to: nil)
  • fetch_images (Boolean) (defaults to: nil)
  • is_draft (Boolean) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



960
961
962
963
964
965
966
967
968
969
970
971
972
973
# File 'lib/google/apis/blogger_v3/service.rb', line 960

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)
  command = make_simple_command(:post, 'v3/blogs/{blogId}/posts', options)
  command.request_representation = Google::Apis::BloggerV3::Post::Representation
  command.request_object = post_object
  command.response_representation = Google::Apis::BloggerV3::Post::Representation
  command.response_class = Google::Apis::BloggerV3::Post
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.query['fetchBody'] = fetch_body unless fetch_body.nil?
  command.query['fetchImages'] = fetch_images unless fetch_images.nil?
  command.query['isDraft'] = is_draft unless is_draft.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_blogs_by_user(user_id, fetch_user_info: nil, role: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::BlogList

Lists blogs by user.

Parameters:

  • user_id (String)
  • fetch_user_info (Boolean) (defaults to: nil)
  • role (Array<String>, String) (defaults to: nil)
  • status (Array<String>, String) (defaults to: nil)

    Default value of status is LIVE.

  • view (String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/google/apis/blogger_v3/service.rb', line 175

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)
  command = make_simple_command(:get, 'v3/users/{userId}/blogs', options)
  command.response_representation = Google::Apis::BloggerV3::BlogList::Representation
  command.response_class = Google::Apis::BloggerV3::BlogList
  command.params['userId'] = user_id unless user_id.nil?
  command.query['fetchUserInfo'] =  unless .nil?
  command.query['role'] = role unless role.nil?
  command.query['status'] = status unless status.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#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) {|result, err| ... } ⇒ Google::Apis::BloggerV3::CommentList

Lists comments.

Parameters:

  • blog_id (String)
  • post_id (String)
  • end_date (String) (defaults to: nil)
  • fetch_bodies (Boolean) (defaults to: nil)
  • max_results (Fixnum) (defaults to: nil)
  • page_token (String) (defaults to: nil)
  • start_date (String) (defaults to: nil)
  • status (String) (defaults to: nil)
  • view (String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# File 'lib/google/apis/blogger_v3/service.rb', line 315

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)
  command = make_simple_command(:get, 'v3/blogs/{blogId}/posts/{postId}/comments', options)
  command.response_representation = Google::Apis::BloggerV3::CommentList::Representation
  command.response_class = Google::Apis::BloggerV3::CommentList
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['postId'] = post_id unless post_id.nil?
  command.query['endDate'] = end_date unless end_date.nil?
  command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['startDate'] = start_date unless start_date.nil?
  command.query['status'] = status unless status.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#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) {|result, err| ... } ⇒ Google::Apis::BloggerV3::CommentList

Lists comments by blog.

Parameters:

  • blog_id (String)
  • end_date (String) (defaults to: nil)
  • fetch_bodies (Boolean) (defaults to: nil)
  • max_results (Fixnum) (defaults to: nil)
  • page_token (String) (defaults to: nil)
  • start_date (String) (defaults to: nil)
  • status (Array<String>, String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# File 'lib/google/apis/blogger_v3/service.rb', line 358

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)
  command = make_simple_command(:get, 'v3/blogs/{blogId}/comments', options)
  command.response_representation = Google::Apis::BloggerV3::CommentList::Representation
  command.response_class = Google::Apis::BloggerV3::CommentList
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.query['endDate'] = end_date unless end_date.nil?
  command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['startDate'] = start_date unless start_date.nil?
  command.query['status'] = status unless status.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_pages(blog_id, fetch_bodies: nil, max_results: nil, page_token: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::PageList

Lists pages.

Parameters:

  • blog_id (String)
  • fetch_bodies (Boolean) (defaults to: nil)
  • max_results (Fixnum) (defaults to: nil)
  • page_token (String) (defaults to: nil)
  • status (Array<String>, String) (defaults to: nil)
  • view (String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



594
595
596
597
598
599
600
601
602
603
604
605
606
607
# File 'lib/google/apis/blogger_v3/service.rb', line 594

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)
  command = make_simple_command(:get, 'v3/blogs/{blogId}/pages', options)
  command.response_representation = Google::Apis::BloggerV3::PageList::Representation
  command.response_class = Google::Apis::BloggerV3::PageList
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['status'] = status unless status.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#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) {|result, err| ... } ⇒ Google::Apis::BloggerV3::PostUserInfosList

Lists post and user info pairs.

Parameters:

  • user_id (String)
  • blog_id (String)
  • end_date (String) (defaults to: nil)
  • fetch_bodies (Boolean) (defaults to: nil)
  • labels (String) (defaults to: nil)
  • max_results (Fixnum) (defaults to: nil)
  • order_by (String) (defaults to: nil)
  • page_token (String) (defaults to: nil)
  • start_date (String) (defaults to: nil)
  • status (Array<String>, String) (defaults to: nil)
  • view (String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
# File 'lib/google/apis/blogger_v3/service.rb', line 811

def (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)
  command = make_simple_command(:get, 'v3/users/{userId}/blogs/{blogId}/posts', options)
  command.response_representation = Google::Apis::BloggerV3::PostUserInfosList::Representation
  command.response_class = Google::Apis::BloggerV3::PostUserInfosList
  command.params['userId'] = user_id unless user_id.nil?
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.query['endDate'] = end_date unless end_date.nil?
  command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
  command.query['labels'] = labels unless labels.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['startDate'] = start_date unless start_date.nil?
  command.query['status'] = status unless status.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_posts(blog_id, end_date: nil, fetch_bodies: nil, fetch_images: nil, labels: nil, max_results: nil, order_by: nil, page_token: nil, sort_option: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::PostList

Lists posts.

Parameters:

  • blog_id (String)
  • end_date (String) (defaults to: nil)
  • fetch_bodies (Boolean) (defaults to: nil)
  • fetch_images (Boolean) (defaults to: nil)
  • labels (String) (defaults to: nil)
  • max_results (Fixnum) (defaults to: nil)
  • order_by (String) (defaults to: nil)
  • page_token (String) (defaults to: nil)
  • sort_option (String) (defaults to: nil)

    Sort direction applied to post list.

  • start_date (String) (defaults to: nil)
  • status (Array<String>, String) (defaults to: nil)
  • view (String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
# File 'lib/google/apis/blogger_v3/service.rb', line 1006

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, sort_option: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v3/blogs/{blogId}/posts', options)
  command.response_representation = Google::Apis::BloggerV3::PostList::Representation
  command.response_class = Google::Apis::BloggerV3::PostList
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.query['endDate'] = end_date unless end_date.nil?
  command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
  command.query['fetchImages'] = fetch_images unless fetch_images.nil?
  command.query['labels'] = labels unless labels.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['sortOption'] = sort_option unless sort_option.nil?
  command.query['startDate'] = start_date unless start_date.nil?
  command.query['status'] = status unless status.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#mark_comment_as_spam(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Comment

Marks a comment as spam by blog id, post id and comment id.

Parameters:

  • blog_id (String)
  • post_id (String)
  • comment_id (String)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



395
396
397
398
399
400
401
402
403
404
405
# File 'lib/google/apis/blogger_v3/service.rb', line 395

def mark_comment_as_spam(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/spam', options)
  command.response_representation = Google::Apis::BloggerV3::Comment::Representation
  command.response_class = Google::Apis::BloggerV3::Comment
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['postId'] = post_id unless post_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_page(blog_id, page_id, page_object = nil, publish: nil, revert: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Page

Patches a page.

Parameters:

  • blog_id (String)
  • page_id (String)
  • page_object (Google::Apis::BloggerV3::Page) (defaults to: nil)
  • publish (Boolean) (defaults to: nil)
  • revert (Boolean) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



632
633
634
635
636
637
638
639
640
641
642
643
644
645
# File 'lib/google/apis/blogger_v3/service.rb', line 632

def patch_page(blog_id, page_id, page_object = nil, publish: nil, revert: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v3/blogs/{blogId}/pages/{pageId}', options)
  command.request_representation = Google::Apis::BloggerV3::Page::Representation
  command.request_object = page_object
  command.response_representation = Google::Apis::BloggerV3::Page::Representation
  command.response_class = Google::Apis::BloggerV3::Page
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['pageId'] = page_id unless page_id.nil?
  command.query['publish'] = publish unless publish.nil?
  command.query['revert'] = revert unless revert.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#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) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Post

Patches a post.

Parameters:

  • blog_id (String)
  • post_id (String)
  • post_object (Google::Apis::BloggerV3::Post) (defaults to: nil)
  • fetch_body (Boolean) (defaults to: nil)
  • fetch_images (Boolean) (defaults to: nil)
  • max_comments (Fixnum) (defaults to: nil)
  • publish (Boolean) (defaults to: nil)
  • revert (Boolean) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
# File 'lib/google/apis/blogger_v3/service.rb', line 1053

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)
  command = make_simple_command(:patch, 'v3/blogs/{blogId}/posts/{postId}', options)
  command.request_representation = Google::Apis::BloggerV3::Post::Representation
  command.request_object = post_object
  command.response_representation = Google::Apis::BloggerV3::Post::Representation
  command.response_class = Google::Apis::BloggerV3::Post
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['postId'] = post_id unless post_id.nil?
  command.query['fetchBody'] = fetch_body unless fetch_body.nil?
  command.query['fetchImages'] = fetch_images unless fetch_images.nil?
  command.query['maxComments'] = max_comments unless max_comments.nil?
  command.query['publish'] = publish unless publish.nil?
  command.query['revert'] = revert unless revert.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#publish_page(blog_id, page_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Page

Publishes a page.

Parameters:

  • blog_id (String)
  • page_id (String)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



667
668
669
670
671
672
673
674
675
676
# File 'lib/google/apis/blogger_v3/service.rb', line 667

def publish_page(blog_id, page_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v3/blogs/{blogId}/pages/{pageId}/publish', options)
  command.response_representation = Google::Apis::BloggerV3::Page::Representation
  command.response_class = Google::Apis::BloggerV3::Page
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['pageId'] = page_id unless page_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#publish_post(blog_id, post_id, publish_date: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Post

Publishes a post.

Parameters:

  • blog_id (String)
  • post_id (String)
  • publish_date (String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
# File 'lib/google/apis/blogger_v3/service.rb', line 1092

def publish_post(blog_id, post_id, publish_date: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v3/blogs/{blogId}/posts/{postId}/publish', options)
  command.response_representation = Google::Apis::BloggerV3::Post::Representation
  command.response_class = Google::Apis::BloggerV3::Post
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['postId'] = post_id unless post_id.nil?
  command.query['publishDate'] = publish_date unless publish_date.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#remove_comment_content(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Comment

Removes the content of a comment by blog id, post id and comment id.

Parameters:

  • blog_id (String)
  • post_id (String)
  • comment_id (String)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



428
429
430
431
432
433
434
435
436
437
438
# File 'lib/google/apis/blogger_v3/service.rb', line 428

def remove_comment_content(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/removecontent', options)
  command.response_representation = Google::Apis::BloggerV3::Comment::Representation
  command.response_class = Google::Apis::BloggerV3::Comment
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['postId'] = post_id unless post_id.nil?
  command.params['commentId'] = comment_id unless comment_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#revert_page(blog_id, page_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Page

Reverts a published or scheduled page to draft state.

Parameters:

  • blog_id (String)
  • page_id (String)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



698
699
700
701
702
703
704
705
706
707
# File 'lib/google/apis/blogger_v3/service.rb', line 698

def revert_page(blog_id, page_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v3/blogs/{blogId}/pages/{pageId}/revert', options)
  command.response_representation = Google::Apis::BloggerV3::Page::Representation
  command.response_class = Google::Apis::BloggerV3::Page
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['pageId'] = page_id unless page_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#revert_post(blog_id, post_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Post

Reverts a published or scheduled post to draft state.

Parameters:

  • blog_id (String)
  • post_id (String)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
# File 'lib/google/apis/blogger_v3/service.rb', line 1124

def revert_post(blog_id, post_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v3/blogs/{blogId}/posts/{postId}/revert', options)
  command.response_representation = Google::Apis::BloggerV3::Post::Representation
  command.response_class = Google::Apis::BloggerV3::Post
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['postId'] = post_id unless post_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#search_posts(blog_id, q, fetch_bodies: nil, order_by: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::PostList

Searches for posts matching given query terms in the specified blog.

Parameters:

  • blog_id (String)
  • q (String)
  • fetch_bodies (Boolean) (defaults to: nil)
  • order_by (String) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
# File 'lib/google/apis/blogger_v3/service.rb', line 1157

def search_posts(blog_id, q, fetch_bodies: nil, order_by: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v3/blogs/{blogId}/posts/search', options)
  command.response_representation = Google::Apis::BloggerV3::PostList::Representation
  command.response_class = Google::Apis::BloggerV3::PostList
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['q'] = q unless q.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_page(blog_id, page_id, page_object = nil, publish: nil, revert: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Page

Updates a page by blog id and page id.

Parameters:

  • blog_id (String)
  • page_id (String)
  • page_object (Google::Apis::BloggerV3::Page) (defaults to: nil)
  • publish (Boolean) (defaults to: nil)
  • revert (Boolean) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



732
733
734
735
736
737
738
739
740
741
742
743
744
745
# File 'lib/google/apis/blogger_v3/service.rb', line 732

def update_page(blog_id, page_id, page_object = nil, publish: nil, revert: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'v3/blogs/{blogId}/pages/{pageId}', options)
  command.request_representation = Google::Apis::BloggerV3::Page::Representation
  command.request_object = page_object
  command.response_representation = Google::Apis::BloggerV3::Page::Representation
  command.response_class = Google::Apis::BloggerV3::Page
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['pageId'] = page_id unless page_id.nil?
  command.query['publish'] = publish unless publish.nil?
  command.query['revert'] = revert unless revert.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#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) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Post

Updates a post by blog id and post id.

Parameters:

  • blog_id (String)
  • post_id (String)
  • post_object (Google::Apis::BloggerV3::Post) (defaults to: nil)
  • fetch_body (Boolean) (defaults to: nil)
  • fetch_images (Boolean) (defaults to: nil)
  • max_comments (Fixnum) (defaults to: nil)
  • publish (Boolean) (defaults to: nil)
  • revert (Boolean) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
# File 'lib/google/apis/blogger_v3/service.rb', line 1196

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)
  command = make_simple_command(:put, 'v3/blogs/{blogId}/posts/{postId}', options)
  command.request_representation = Google::Apis::BloggerV3::Post::Representation
  command.request_object = post_object
  command.response_representation = Google::Apis::BloggerV3::Post::Representation
  command.response_class = Google::Apis::BloggerV3::Post
  command.params['blogId'] = blog_id unless blog_id.nil?
  command.params['postId'] = post_id unless post_id.nil?
  command.query['fetchBody'] = fetch_body unless fetch_body.nil?
  command.query['fetchImages'] = fetch_images unless fetch_images.nil?
  command.query['maxComments'] = max_comments unless max_comments.nil?
  command.query['publish'] = publish unless publish.nil?
  command.query['revert'] = revert unless revert.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end