Class: Google::Apis::BloggerV2::BloggerService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::BloggerV2::BloggerService
- Defined in:
- generated/google/apis/blogger_v2/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
-
#get_blog(blog_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Blog
Gets a blog by id.
-
#get_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Comment
Gets a comment by blog id, post id and comment id.
-
#get_page(blog_id, page_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Page
Gets a page by blog id and page id.
-
#get_post(blog_id, post_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Post
Gets a post by blog id and post id.
-
#get_user(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::User
Gets a user by user id.
-
#initialize ⇒ BloggerService
constructor
A new instance of BloggerService.
-
#list_blogs(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::BlogList
Lists blogs by user id, possibly filtered.
-
#list_comments(blog_id, post_id, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::CommentList
Lists comments.
-
#list_pages(blog_id, fetch_bodies: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::PageList
Lists pages.
-
#list_posts(blog_id, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::PostList
Lists posts.
Constructor Details
#initialize ⇒ BloggerService
Returns a new instance of BloggerService.
45 46 47 48 |
# File 'generated/google/apis/blogger_v2/service.rb', line 45 def initialize super('https://blogger.googleapis.com/', '') @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 'generated/google/apis/blogger_v2/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 'generated/google/apis/blogger_v2/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#get_blog(blog_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Blog
Gets a blog by id.
69 70 71 72 73 74 75 76 77 |
# File 'generated/google/apis/blogger_v2/service.rb', line 69 def get_blog(blog_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/blogs/{blogId}', ) command.response_representation = Google::Apis::BloggerV2::Blog::Representation command.response_class = Google::Apis::BloggerV2::Blog command.params['blogId'] = blog_id unless blog_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_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Comment
Gets a comment by blog id, post id and comment id.
129 130 131 132 133 134 135 136 137 138 139 |
# File 'generated/google/apis/blogger_v2/service.rb', line 129 def get_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/blogs/{blogId}/posts/{postId}/comments/{commentId}', ) command.response_representation = Google::Apis::BloggerV2::Comment::Representation command.response_class = Google::Apis::BloggerV2::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 |
#get_page(blog_id, page_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Page
Gets a page by blog id and page id.
200 201 202 203 204 205 206 207 208 209 |
# File 'generated/google/apis/blogger_v2/service.rb', line 200 def get_page(blog_id, page_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/blogs/{blogId}/pages/{pageId}', ) command.response_representation = Google::Apis::BloggerV2::Page::Representation command.response_class = Google::Apis::BloggerV2::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 |
#get_post(blog_id, post_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Post
Gets a post by blog id and post id
262 263 264 265 266 267 268 269 270 271 |
# File 'generated/google/apis/blogger_v2/service.rb', line 262 def get_post(blog_id, post_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/blogs/{blogId}/posts/{postId}', ) command.response_representation = Google::Apis::BloggerV2::Post::Representation command.response_class = Google::Apis::BloggerV2::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 |
#get_user(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::User
Gets a user by user id.
329 330 331 332 333 334 335 336 337 |
# File 'generated/google/apis/blogger_v2/service.rb', line 329 def get_user(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/users/{userId}', ) command.response_representation = Google::Apis::BloggerV2::User::Representation command.response_class = Google::Apis::BloggerV2::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 |
#list_blogs(user_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::BlogList
Lists blogs by user id, possibly filtered.
98 99 100 101 102 103 104 105 106 |
# File 'generated/google/apis/blogger_v2/service.rb', line 98 def list_blogs(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/users/{userId}/blogs', ) command.response_representation = Google::Apis::BloggerV2::BlogList::Representation command.response_class = Google::Apis::BloggerV2::BlogList 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 |
#list_comments(blog_id, post_id, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::CommentList
Lists comments.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'generated/google/apis/blogger_v2/service.rb', line 165 def list_comments(blog_id, post_id, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/blogs/{blogId}/posts/{postId}/comments', ) command.response_representation = Google::Apis::BloggerV2::CommentList::Representation command.response_class = Google::Apis::BloggerV2::CommentList command.params['blogId'] = blog_id unless blog_id.nil? command.params['postId'] = post_id unless post_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['startDate'] = start_date unless start_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 |
#list_pages(blog_id, fetch_bodies: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::PageList
Lists pages.
231 232 233 234 235 236 237 238 239 240 |
# File 'generated/google/apis/blogger_v2/service.rb', line 231 def list_pages(blog_id, fetch_bodies: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/blogs/{blogId}/pages', ) command.response_representation = Google::Apis::BloggerV2::PageList::Representation command.response_class = Google::Apis::BloggerV2::PageList command.params['blogId'] = blog_id unless blog_id.nil? command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.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, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::PostList
Lists posts.
296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'generated/google/apis/blogger_v2/service.rb', line 296 def list_posts(blog_id, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/blogs/{blogId}/posts', ) command.response_representation = Google::Apis::BloggerV2::PostList::Representation command.response_class = Google::Apis::BloggerV2::PostList 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['startDate'] = start_date unless start_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 |