Class: ButterCMS::Post
- Inherits:
-
ButterResource
- Object
- ButterResource
- ButterCMS::Post
- Defined in:
- lib/buttercms/post.rb
Instance Attribute Summary
Attributes inherited from ButterResource
Class Method Summary collapse
Methods inherited from ButterResource
all, create, endpoint, find, #initialize, #inspect, #marshal_dump, #marshal_load, patch_endpoint, update
Constructor Details
This class inherits a constructor from ButterCMS::ButterResource
Class Method Details
.resource_path ⇒ Object
3 4 5 |
# File 'lib/buttercms/post.rb', line 3 def self.resource_path "/posts/" end |
.search(query = '', options = {}) ⇒ Object
7 8 9 10 11 |
# File 'lib/buttercms/post.rb', line 7 def self.search(query = '', = {}) response = ButterCMS.request('/search/', {query: query}.merge()) self.create_collection(response) end |