Class: ButterCMS::Content
Instance Attribute Summary
#data, #meta
Class Method Summary
collapse
all, create, endpoint, find, #initialize, #inspect, #marshal_dump, #marshal_load, patch_endpoint, update
Class Method Details
.fetch(collection_slugs, options = {}) ⇒ Object
13
14
15
16
17
18
|
# File 'lib/buttercms/content.rb', line 13
def self.fetch(collection_slugs, options = {})
params = { keys: collection_slugs.join(',') }.merge(options)
response = ButterCMS.request(self.resource_path, params)
self.new(response)
end
|
.list(collection_slug, options = {}) ⇒ Object
7
8
9
10
11
|
# File 'lib/buttercms/content.rb', line 7
def self.list(collection_slug, options = {})
response = ButterCMS.request(self.endpoint(collection_slug), options)
self.create_collection(response)
end
|
.resource_path ⇒ Object
3
4
5
|
# File 'lib/buttercms/content.rb', line 3
def self.resource_path
"/content/"
end
|