Module: Content
- Includes:
- Assets, ContentInstances, ContentTemplates, Conversations, DAM, Forms, MessageTemplates, Messages, Pages, Stories, StoryTemplates, StoryVersions
- Included in:
- Mints::User
- Defined in:
- lib/user/content/content.rb,
lib/contact/content/content.rb
Instance Method Summary collapse
-
#create_author(data) ⇒ Object
Create author.
-
#create_keyword(data) ⇒ Object
Create keyword.
-
#create_stage(data) ⇒ Object
Create stage.
-
#get_author(id) ⇒ Object
Get author.
-
#get_authors ⇒ Object
Get authors.
-
#get_keyword(id) ⇒ Object
Get keyword.
-
#get_keywords(options = nil) ⇒ Object
Get keywords.
-
#get_public_images_url ⇒ Object
Get public images url.
-
#get_stage(id) ⇒ Object
Get stage.
-
#get_stages(options = nil) ⇒ Object
Get stages.
-
#update_author(id, data) ⇒ Object
Update author.
-
#update_keyword(id, data) ⇒ Object
Update keyword.
-
#update_stage(id, data) ⇒ Object
Update stage.
Methods included from StoryTemplates
#create_story_template, #get_story_template, #get_story_template_support_data, #get_story_templates, #get_story_templates_support_data, #update_story_template
Methods included from StoryVersions
#create_story_version, #delete_story_version, #duplicate_story_version, #get_story_version, #get_story_versions, #publish_story_version, #update_story_version
Methods included from Stories
#create_story, #delete_story, #duplicate_story, #get_stories, #get_story, #update_story
Methods included from Pages
#create_page, #delete_page, #get_bundles, #get_page, #get_page_groups, #get_pages, #update_page
Methods included from Messages
#create_message, #delete_message, #get_message, #get_messages, #update_message
Methods included from MessageTemplates
#create_message_template, #delete_message_template, #duplicate_message_template, #get_driver_templates, #get_message_template, #get_message_templates, #get_recipient_variables, #get_variables_of_content_page_from_message_templates, #preview_message_template, #send_message_template, #update_message_template
Methods included from Forms
#create_form, #delete_form, #delete_form_submission, #duplicate_form, #get_form, #get_form_activation_words, #get_form_aggregates, #get_form_submission, #get_form_submissions, #get_form_support_data, #get_forms, #publish_form, #reset_form_aggregates, #revert_published_form, #schedule_form, #update_form
Methods included from DAM
#create_dam_folder, #delete_dam, #get_dam_asset_locations, #get_dam_load_tree, #paste_dam, #rename_dam, #search_dam, #send_to_trash_dam
Methods included from Conversations
#attach_contact_in_conversation, #attach_form_in_conversation, #attach_user_in_conversation, #create_conversation, #create_message, #delete_conversation, #detach_contact_in_conversation, #detach_form_in_conversation, #detach_user_in_conversation, #get_conversation, #get_conversation_participants, #get_conversations, #get_message, #get_messages, #update_conversation, #update_conversation_status
Methods included from ContentTemplates
#create_content_template, #delete_content_template, #duplicate_content_template, #get_content_template, #get_content_template_instances, #get_content_templates, #update_content_template
Methods included from ContentInstances
#create_content_instance, #delete_content_instance, #duplicate_content_instance, #get_content_instance, #get_content_instances, #publish_content_instance, #revert_published_content_instance, #schedule_content_instance, #update_content_instance
Methods included from Assets
#create_asset, #create_asset_size, #delete_asset, #download_asset, #generate_asset_variation, #get_asset, #get_asset_doc_types, #get_asset_info, #get_asset_link_info, #get_asset_public_route, #get_asset_size, #get_asset_sizes, #get_asset_thumbnails, #get_asset_usage, #get_asset_variation, #get_assets, #update_asset, #upload_asset
Instance Method Details
#create_author(data) ⇒ Object
Create author.
Create an author with data.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
title: 'Howard Phillips Lovecraft',
slug: 'howard-phillips-lovecraft'
}
@data = @mints_user.(data.to_json)
76 77 78 |
# File 'lib/user/content/content.rb', line 76 def (data) @client.raw('post', '/content/authors', nil, data) end |
#create_keyword(data) ⇒ Object
Create keyword.
Create a keyword with data.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
title: 'New Keyword'
}
@data = @mints_user.create_keyword(data.to_json)
135 136 137 |
# File 'lib/user/content/content.rb', line 135 def create_keyword(data) @client.raw('post', '/content/keywords', nil, data) end |
#create_stage(data) ⇒ Object
Create stage.
Create a stage with data.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
config_json = {
count: 1
}
event_json = {
rset: 'DTSTART:20190214T000000Z',
duration: 1
}
data = {
title: 'New Stage',
description: 'New Stage Description',
config_json: config_json.to_json,
event_json: event_json.to_json
}
@data = @mints_user.create_stage(data.to_json)
206 207 208 |
# File 'lib/user/content/content.rb', line 206 def create_stage(data) @client.raw('post', '/content/stages', nil, data) end |
#get_author(id) ⇒ Object
Get author.
Get an author.
Parameters
- id
-
(Integer) – Author id.
Example
@data = @mints_user.(1)
60 61 62 |
# File 'lib/user/content/content.rb', line 60 def (id) @client.raw('get', "/content/authors/#{id}") end |
#get_authors ⇒ Object
Get authors.
Get authors.
Example
@data = @mints_user.
48 49 50 |
# File 'lib/user/content/content.rb', line 48 def @client.raw('get', '/content/authors') end |
#get_keyword(id) ⇒ Object
Get keyword.
Get a keyword.
Parameters
- id
-
(Integer) – Keyword id.
120 121 122 |
# File 'lib/user/content/content.rb', line 120 def get_keyword(id) @client.raw('get', "/content/keywords/#{id}") end |
#get_keywords(options = nil) ⇒ Object
Get keywords.
Get a collection of keywords.
Parameters
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @mints_user.get_keywords
Second Example
= { fields: 'title' }
@data = @mints_user.get_keywords()
110 111 112 |
# File 'lib/user/content/content.rb', line 110 def get_keywords( = nil) @client.raw('get', '/content/keywords', ) end |
#get_public_images_url ⇒ Object
Get public images url.
Get public images url.
Example
@data = @mints_user.get_public_images_url
35 36 37 |
# File 'lib/user/content/content.rb', line 35 def get_public_images_url @client.raw('get', '/content/public-images-url') end |
#get_stage(id) ⇒ Object
Get stage.
Get a stage.
Parameters
- id
-
(Integer) – Stage id.
Example
@data = @mints_user.get_stage(1)
181 182 183 |
# File 'lib/user/content/content.rb', line 181 def get_stage(id) @client.raw('get', "/content/stages/#{id}") end |
#get_stages(options = nil) ⇒ Object
Get stages.
Get a collection of stages.
Parameters
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @mints_user.get_stages
Second Example
= { fields: 'title' }
@data = @mints_user.get_stages()
169 170 171 |
# File 'lib/user/content/content.rb', line 169 def get_stages( = nil) @client.raw('get', '/content/stages', ) end |
#update_author(id, data) ⇒ Object
Update author.
Update an author info.
Parameters
- id
-
(Integer) – Author id.
- data
-
(Hash) – Data to be submitted.
Example
89 90 91 92 |
# File 'lib/user/content/content.rb', line 89 def (id, data) # FIXME: Author controller doesnt receive data @client.raw('put', "/content/authors/#{id}", nil, data) end |
#update_keyword(id, data) ⇒ Object
Update keyword.
Update a keyword info.
Parameters
- id
-
(Integer) – Keyword id.
- data
-
(Hash) – Data to be submitted.
Example
148 149 150 151 |
# File 'lib/user/content/content.rb', line 148 def update_keyword(id, data) # FIXME: Keyword controller doesnt receive data @client.raw('put', "/content/keywords/#{id}", nil, data) end |
#update_stage(id, data) ⇒ Object
Update stage.
Update a stage info.
Parameters
- id
-
(Integer) – Stage id.
- data
-
(Hash) – Data to be submitted.
Example
config_json = {
count: 2
}
event_json = {
rset: 'DTSTART:20190214T000000Z',
duration: 2
}
data = {
stageProps: {
title: 'New Stage Modified',
description: 'New Stage Description Modified'
},
config_json: config_json.to_json,
event_json: event_json.to_json
}
@data = @mints_user.update_stage(3, data.to_json)
234 235 236 237 |
# File 'lib/user/content/content.rb', line 234 def update_stage(id, data) # TODO: Inform StageController.update method has been modified @client.raw('put', "/content/stages/#{id}", nil, data) end |