Class: Google::Apis::BloggerV3::BloggerService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::BloggerV3::BloggerService
- 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.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://blogger.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#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.
-
#delete_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes a comment by blog id, post id and comment id.
-
#delete_page(blog_id, page_id, use_trash: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes a page by blog id and page id.
-
#delete_post(blog_id, post_id, use_trash: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes a post by blog id and post id.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#get_user(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::User
Gets one user by user_id.
-
#initialize ⇒ BloggerService
constructor
A new instance of BloggerService.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#publish_page(blog_id, page_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::Page
Publishes a page.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
Constructor Details
#initialize ⇒ BloggerService
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
#key ⇒ String
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.
40 41 42 |
# File 'lib/google/apis/blogger_v3/service.rb', line 40 def key @key end |
#quota_user ⇒ String
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.
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.
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', ) 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.
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}', ) 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.
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}', ) 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.
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}', ) 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.
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}', ) 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.
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', ) 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.
75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/google/apis/blogger_v3/service.rb', line 75 def get_blog_user_info(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}', ) 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.
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}', ) 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.
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}', ) 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.
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', ) 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
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}', ) 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.
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', ) 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.
769 770 771 772 773 774 775 776 777 778 779 780 |
# File 'lib/google/apis/blogger_v3/service.rb', line 769 def get_post_user_info(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}', ) 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.
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}', ) 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.
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', ) 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.
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', ) 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.
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', ) 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'] = fetch_user_info unless fetch_user_info.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.
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', ) 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.
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', ) 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.
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', ) 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.
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 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) command = make_simple_command(:get, 'v3/users/{userId}/blogs/{blogId}/posts', ) 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.
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', ) 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.
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', ) 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.
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}', ) 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.
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}', ) 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.
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', ) 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.
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', ) 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.
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', ) 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.
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', ) 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.
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', ) 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.
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', ) 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.
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}', ) 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.
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}', ) 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 |