Class: Weeblycloud::BlogPost
- Inherits:
-
CloudResource
- Object
- CloudResource
- Weeblycloud::BlogPost
- Includes:
- Deleteable, Saveable
- Defined in:
- lib/weeblycloud/blogpost.rb
Overview
Represents a BlogPost resource. cloud-developer.weebly.com/blog-post.html
Instance Attribute Summary
Attributes inherited from CloudResource
Instance Method Summary collapse
-
#id ⇒ Object
Returns the blog_post_id.
-
#initialize(user_id, site_id, blog_id, blog_post_id, data = nil) ⇒ BlogPost
constructor
A new instance of BlogPost.
Methods included from Deleteable
Methods included from Saveable
Methods inherited from CloudResource
#[], #get, #get_property, #to_s
Constructor Details
#initialize(user_id, site_id, blog_id, blog_post_id, data = nil) ⇒ BlogPost
Returns a new instance of BlogPost.
12 13 14 15 16 17 18 19 20 |
# File 'lib/weeblycloud/blogpost.rb', line 12 def initialize(user_id, site_id, blog_id, blog_post_id, data = nil) @user_id = user_id.to_i @site_id = site_id.to_i @blog_id = blog_id.to_i @blog_post_id = blog_post_id.to_i @endpoint = "user/#{@user_id}/site/#{@site_id}/blog/#{@blog_id}/post/#{@blog_post_id}" super(data) end |
Instance Method Details
#id ⇒ Object
Returns the blog_post_id
23 24 25 |
# File 'lib/weeblycloud/blogpost.rb', line 23 def id @blog_post_id end |