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
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
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
51 52 53 54 |
# File 'generated/google/apis/blogger_v2/service.rb', line 51 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 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. Overrides userIp if both are provided.
44 45 46 |
# File 'generated/google/apis/blogger_v2/service.rb', line 44 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
49 50 51 |
# File 'generated/google/apis/blogger_v2/service.rb', line 49 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.
80 81 82 83 84 85 86 87 88 89 |
# File 'generated/google/apis/blogger_v2/service.rb', line 80 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.
119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'generated/google/apis/blogger_v2/service.rb', line 119 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.
208 209 210 211 212 213 214 215 216 217 218 |
# File 'generated/google/apis/blogger_v2/service.rb', line 208 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.
284 285 286 287 288 289 290 291 292 293 294 |
# File 'generated/google/apis/blogger_v2/service.rb', line 284 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.
367 368 369 370 371 372 373 374 375 376 |
# File 'generated/google/apis/blogger_v2/service.rb', line 367 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.
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'generated/google/apis/blogger_v2/service.rb', line 166 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.
246 247 248 249 250 251 252 253 254 255 256 |
# File 'generated/google/apis/blogger_v2/service.rb', line 246 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.
328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'generated/google/apis/blogger_v2/service.rb', line 328 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.
403 404 405 406 407 408 409 410 411 412 |
# File 'generated/google/apis/blogger_v2/service.rb', line 403 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 |