Module: PublicStoryVersions
- Included in:
- PublicContent
- Defined in:
- lib/pub/content/story_versions.rb
Instance Method Summary collapse
-
#get_story_version(slug, options = nil) ⇒ Object
Get Story Version.
-
#get_story_versions(options = nil, use_post = true) ⇒ Object
Get Story Versions.
Instance Method Details
#get_story_version(slug, options = nil) ⇒ Object
Get Story Version.
Get a single story version.
Parameters
- slug
-
(String) – It’s the string identifier generated by Mints.
- options
-
(Hash) – List of Single Resource Options shown above can be used as parameter.
First Example
@data = @mints_pub.get_story_version('story_slug')
Second Example
@data = @mints_pub.get_story_version('story_slug', )
43 44 45 |
# File 'lib/pub/content/story_versions.rb', line 43 def get_story_version(slug, = nil) @client.raw('get', "/content/story-versions/#{slug}", ) end |
#get_story_versions(options = nil, use_post = true) ⇒ Object
Get Story Versions.
Get a collection of story version.
Parameters
- options
-
(Hash) – List of Resource collection Options shown above can be used as parameter.
- use_post
-
(Boolean) – Variable to determine if the request is by ‘post’ or ‘get’ functions.
First Example
@data = @mints_pub.get_story_versions
Second Example
= {
fields: 'id, title'
}
@data = @mints_pub.get_story_versions()
Third Example
= {
fields: 'id, title'
}
@data = @mints_pub.get_story_versions(, false)
26 27 28 |
# File 'lib/pub/content/story_versions.rb', line 26 def get_story_versions( = nil, use_post = true) get_query_results('/content/story-versions', , use_post) end |