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 v3
The Blogger API provides access to posts, comments and pages of a Blogger blog.
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, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes a page by blog id and page id.
-
#delete_post(blog_id, post_id, 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, 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.
45 46 47 48 49 50 |
# File 'lib/google/apis/blogger_v3/service.rb', line 45 def initialize super('https://blogger.googleapis.com/', '', 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.
38 39 40 |
# File 'lib/google/apis/blogger_v3/service.rb', line 38 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.
43 44 45 |
# File 'lib/google/apis/blogger_v3/service.rb', line 43 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.
208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/google/apis/blogger_v3/service.rb', line 208 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.
241 242 243 244 245 246 247 248 249 |
# File 'lib/google/apis/blogger_v3/service.rb', line 241 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, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a page by blog id and page id.
489 490 491 492 493 494 495 496 |
# File 'lib/google/apis/blogger_v3/service.rb', line 489 def delete_page(blog_id, page_id, 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['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, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a post by blog id and post id.
846 847 848 849 850 851 852 853 |
# File 'lib/google/apis/blogger_v3/service.rb', line 846 def delete_post(blog_id, post_id, 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['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.
106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/google/apis/blogger_v3/service.rb', line 106 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.
138 139 140 141 142 143 144 145 146 147 |
# File 'lib/google/apis/blogger_v3/service.rb', line 138 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.
73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/google/apis/blogger_v3/service.rb', line 73 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.
273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/google/apis/blogger_v3/service.rb', line 273 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.
519 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/google/apis/blogger_v3/service.rb', line 519 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.
458 459 460 461 462 463 464 465 466 467 |
# File 'lib/google/apis/blogger_v3/service.rb', line 458 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
879 880 881 882 883 884 885 886 887 888 889 890 891 892 |
# File 'lib/google/apis/blogger_v3/service.rb', line 879 def get_post(blog_id, post_id, fetch_body: nil, fetch_images: nil, max_comments: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) 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.
916 917 918 919 920 921 922 923 924 925 926 927 |
# File 'lib/google/apis/blogger_v3/service.rb', line 916 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.
764 765 766 767 768 769 770 771 772 773 774 775 |
# File 'lib/google/apis/blogger_v3/service.rb', line 764 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.
1222 1223 1224 1225 1226 1227 1228 1229 1230 |
# File 'lib/google/apis/blogger_v3/service.rb', line 1222 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.
552 553 554 555 556 557 558 559 560 561 562 563 |
# File 'lib/google/apis/blogger_v3/service.rb', line 552 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.
952 953 954 955 956 957 958 959 960 961 962 963 964 965 |
# File 'lib/google/apis/blogger_v3/service.rb', line 952 def insert_post(blog_id, post_object = nil, fetch_body: nil, fetch_images: nil, is_draft: nil, fields: nil, quota_user: nil, options: nil, &block) 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.
173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/google/apis/blogger_v3/service.rb', line 173 def list_blogs_by_user(user_id, fetch_user_info: nil, role: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) 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.
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/google/apis/blogger_v3/service.rb', line 313 def list_comments(blog_id, post_id, end_date: nil, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) 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.
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/google/apis/blogger_v3/service.rb', line 356 def list_comments_by_blog(blog_id, end_date: nil, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, status: nil, fields: nil, quota_user: nil, options: nil, &block) 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.
589 590 591 592 593 594 595 596 597 598 599 600 601 602 |
# File 'lib/google/apis/blogger_v3/service.rb', line 589 def list_pages(blog_id, fetch_bodies: nil, max_results: nil, page_token: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) 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.
806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 |
# File 'lib/google/apis/blogger_v3/service.rb', line 806 def list_post_user_info(user_id, blog_id, end_date: nil, fetch_bodies: nil, labels: nil, max_results: nil, order_by: nil, page_token: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) 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, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV3::PostList
Lists posts.
996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 |
# File 'lib/google/apis/blogger_v3/service.rb', line 996 def list_posts(blog_id, end_date: nil, fetch_bodies: nil, fetch_images: nil, labels: nil, max_results: nil, order_by: nil, page_token: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) 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['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.
393 394 395 396 397 398 399 400 401 402 403 |
# File 'lib/google/apis/blogger_v3/service.rb', line 393 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.
627 628 629 630 631 632 633 634 635 636 637 638 639 640 |
# File 'lib/google/apis/blogger_v3/service.rb', line 627 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.
1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 |
# File 'lib/google/apis/blogger_v3/service.rb', line 1042 def patch_post(blog_id, post_id, post_object = nil, fetch_body: nil, fetch_images: nil, max_comments: nil, publish: nil, revert: nil, fields: nil, quota_user: nil, options: nil, &block) 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.
662 663 664 665 666 667 668 669 670 671 |
# File 'lib/google/apis/blogger_v3/service.rb', line 662 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.
1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 |
# File 'lib/google/apis/blogger_v3/service.rb', line 1081 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.
426 427 428 429 430 431 432 433 434 435 436 |
# File 'lib/google/apis/blogger_v3/service.rb', line 426 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.
693 694 695 696 697 698 699 700 701 702 |
# File 'lib/google/apis/blogger_v3/service.rb', line 693 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.
1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 |
# File 'lib/google/apis/blogger_v3/service.rb', line 1113 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.
1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 |
# File 'lib/google/apis/blogger_v3/service.rb', line 1146 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.
727 728 729 730 731 732 733 734 735 736 737 738 739 740 |
# File 'lib/google/apis/blogger_v3/service.rb', line 727 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.
1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 |
# File 'lib/google/apis/blogger_v3/service.rb', line 1185 def update_post(blog_id, post_id, post_object = nil, fetch_body: nil, fetch_images: nil, max_comments: nil, publish: nil, revert: nil, fields: nil, quota_user: nil, options: nil, &block) 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 |