Class: TumblrWrapper::Post
- Inherits:
-
BlogResource
- Object
- Resource
- BlogResource
- TumblrWrapper::Post
- Defined in:
- lib/tumblr_wrapper/resources/post.rb
Instance Attribute Summary
Attributes inherited from BlogResource
Attributes inherited from Resource
Instance Method Summary collapse
-
#create(parameters = {}) ⇒ Object
Required parameters: :type www.tumblr.com/docs/en/api/v2#posting.
-
#delete(parameters = {}) ⇒ Object
Required parameters: :id www.tumblr.com/docs/en/api/v2#editing.
-
#update(parameters = {}) ⇒ Object
Required parameters: :id www.tumblr.com/docs/en/api/v2#editing.
Methods inherited from BlogResource
Methods inherited from Resource
Methods included from HTTP
Methods included from Validators
#validate_not_present, #validate_oauth, #validate_present
Constructor Details
This class inherits a constructor from TumblrWrapper::BlogResource
Instance Method Details
#create(parameters = {}) ⇒ Object
Required parameters: :type www.tumblr.com/docs/en/api/v2#posting
5 6 7 8 9 10 |
# File 'lib/tumblr_wrapper/resources/post.rb', line 5 def create(parameters = {}) validate_present(:type, parameters) validate_not_present(:id, parameters) http_post('post', parameters) end |
#delete(parameters = {}) ⇒ Object
Required parameters: :id www.tumblr.com/docs/en/api/v2#editing
23 24 25 26 |
# File 'lib/tumblr_wrapper/resources/post.rb', line 23 def delete(parameters = {}) validate_present(:id, parameters) http_post('post/delete', parameters) end |
#update(parameters = {}) ⇒ Object
Required parameters: :id www.tumblr.com/docs/en/api/v2#editing
15 16 17 18 |
# File 'lib/tumblr_wrapper/resources/post.rb', line 15 def update(parameters = {}) validate_present(:id, parameters) http_post('post/edit', parameters) end |