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
API for access to the data within Blogger.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
An opaque string that represents a user for quota purposes.
-
#user_ip ⇒ String
Deprecated.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#get_blog(blog_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Blog
Gets one blog by id.
-
#get_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Comment
Gets one comment by id.
-
#get_page(blog_id, page_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Page
Gets one blog page by id.
-
#get_post(blog_id, post_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Post
Get a post by id.
-
#get_user(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::User
Gets one user by id.
-
#initialize ⇒ BloggerService
constructor
A new instance of BloggerService.
-
#list_comments(blog_id, post_id, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::CommentList
Retrieves the comments for a blog, possibly filtered.
-
#list_pages(blog_id, fetch_bodies: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::PageList
Retrieves pages for a blog, possibly filtered.
-
#list_posts(blog_id, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::PostList
Retrieves a list of posts, possibly filtered.
-
#list_user_blogs(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::BlogList
Retrieves a list of blogs, possibly filtered.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ BloggerService
Returns a new instance of BloggerService
49 50 51 52 |
# File 'generated/google/apis/blogger_v2/service.rb', line 49 def initialize super('https://www.googleapis.com/', 'blogger/v2/') @batch_path = 'batch/blogger/v2' 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 An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
43 44 45 |
# File 'generated/google/apis/blogger_v2/service.rb', line 43 def quota_user @quota_user end |
#user_ip ⇒ String
Returns Deprecated. Please use quotaUser instead.
47 48 49 |
# File 'generated/google/apis/blogger_v2/service.rb', line 47 def user_ip @user_ip end |
Instance Method Details
#get_blog(blog_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Blog
Gets one blog by id.
76 77 78 79 80 81 82 83 84 85 |
# File 'generated/google/apis/blogger_v2/service.rb', line 76 def get_blog(blog_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Comment
Gets one comment by id.
113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'generated/google/apis/blogger_v2/service.rb', line 113 def get_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_page(blog_id, page_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Page
Gets one blog page by id.
198 199 200 201 202 203 204 205 206 207 208 |
# File 'generated/google/apis/blogger_v2/service.rb', line 198 def get_page(blog_id, page_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_post(blog_id, post_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::Post
Get a post by id.
270 271 272 273 274 275 276 277 278 279 280 |
# File 'generated/google/apis/blogger_v2/service.rb', line 270 def get_post(blog_id, post_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::User
Gets one user by id.
349 350 351 352 353 354 355 356 357 358 |
# File 'generated/google/apis/blogger_v2/service.rb', line 349 def get_user(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::CommentList
Retrieves the comments for a blog, possibly filtered.
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'generated/google/apis/blogger_v2/service.rb', line 158 def list_comments(blog_id, post_id, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_pages(blog_id, fetch_bodies: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::PageList
Retrieves pages for a blog, possibly filtered.
234 235 236 237 238 239 240 241 242 243 244 |
# File 'generated/google/apis/blogger_v2/service.rb', line 234 def list_pages(blog_id, fetch_bodies: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::PostList
Retrieves a list of posts, possibly filtered.
312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'generated/google/apis/blogger_v2/service.rb', line 312 def list_posts(blog_id, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_user_blogs(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BloggerV2::BlogList
Retrieves a list of blogs, possibly filtered.
383 384 385 386 387 388 389 390 391 392 |
# File 'generated/google/apis/blogger_v2/service.rb', line 383 def list_user_blogs(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |