Class: Google::Apis::BloggerV2::BloggerService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/blogger_v2/service.rb

Overview

Blogger API

API for access to the data within Blogger.

Examples:

require 'google/apis/blogger_v2'

Blogger = Google::Apis::BloggerV2 # Alias the module
service = Blogger::BloggerService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeBloggerService

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

#keyString

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.

Returns:

  • (String)

    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_userString

Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Returns:

  • (String)

    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_ipString

Returns Deprecated. Please use quotaUser instead.

Returns:

  • (String)

    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.

Parameters:

  • blog_id (String)

    The ID of the blog to get.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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}', options)
  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.

Parameters:

  • blog_id (String)

    ID of the blog to containing the comment.

  • post_id (String)

    ID of the post to fetch posts from.

  • comment_id (String)

    The ID of the comment to get.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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}', options)
  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.

Parameters:

  • blog_id (String)

    ID of the blog containing the page.

  • page_id (String)

    The ID of the page to get.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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}', options)
  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.

Parameters:

  • blog_id (String)

    ID of the blog to fetch the post from.

  • post_id (String)

    The ID of the post

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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}', options)
  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.

Parameters:

  • user_id (String)

    The ID of the user to get.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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}', options)
  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.

Parameters:

  • blog_id (String)

    ID of the blog to fetch comments from.

  • post_id (String)

    ID of the post to fetch posts from.

  • fetch_bodies (Boolean)

    Whether the body content of the comments is included.

  • max_results (Fixnum)

    Maximum number of comments to include in the result.

  • page_token (String)

    Continuation token if request is paged.

  • start_date (DateTime)

    Earliest date of comment to fetch, a date-time with RFC 3339 formatting.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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', options)
  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.

Parameters:

  • blog_id (String)

    ID of the blog to fetch pages from.

  • fetch_bodies (Boolean)

    Whether to retrieve the Page bodies.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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', options)
  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.

Parameters:

  • blog_id (String)

    ID of the blog to fetch posts from.

  • fetch_bodies (Boolean)

    Whether the body content of posts is included.

  • max_results (Fixnum)

    Maximum number of posts to fetch.

  • page_token (String)

    Continuation token if the request is paged.

  • start_date (DateTime)

    Earliest post date to fetch, a date-time with RFC 3339 formatting.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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', options)
  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.

Parameters:

  • user_id (String)

    ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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', options)
  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