Module: PublicContentInstances
- Included in:
- PublicContent
- Defined in:
- lib/pub/content/content_instances.rb
Instance Method Summary collapse
-
#get_content_instance(slug) ⇒ Object
Get Content Instance.
-
#get_content_instances(options = nil) ⇒ Object
Get Content Instances.
Instance Method Details
#get_content_instance(slug) ⇒ Object
Get Content Instance.
Get a single content instance.
Parameters
- slug
-
(String) – It’s the string identifier generated by Mints.
Example
@data = @mints_pub.get_content_instance("content_instance_slug")
34 35 36 |
# File 'lib/pub/content/content_instances.rb', line 34 def get_content_instance(slug) @client.raw('get', "/content/content-instances/#{slug}") end |
#get_content_instances(options = nil) ⇒ Object
Get Content Instances.
Get a collection of content instances. Note: Options must be specified.
Parameters
- options
-
(Hash) – List of Resource collection Options shown above can be used as parameter.
First Example
= {
"template": "content_instance_template_slug"
}
@data = @mints_pub.get_content_instances()
Second Example
= {
"template": "content_instance_template_slug",
sort: "-id"
}
@data = @mints_pub.get_content_instances()
21 22 23 |
# File 'lib/pub/content/content_instances.rb', line 21 def get_content_instances( = nil) @client.raw('get', '/content/content-instances', ) end |