Class: Contentful::Management::EditorInterface
- Inherits:
-
Object
- Object
- Contentful::Management::EditorInterface
- Defined in:
- lib/contentful/management/editor_interface.rb
Overview
Resource class for Editor Interface.
Instance Attribute Summary
Attributes included from Resource::SystemProperties
Attributes included from Resource
#client, #properties, #raw_object, #request
Class Method Summary collapse
-
.create ⇒ Object
Creates an EditorInterface.
-
.default(client, space_id, environment_id, content_type_id) ⇒ Contentful::Management::EditorInterface
Gets the Default Editor Interface.
-
.find ⇒ Object
Finds an EditorInterface.
Instance Method Summary collapse
-
#destroy ⇒ Object
Destroys an EditorInterface.
-
#update(attributes) ⇒ Contentful::Management::EditorInterface
Updates an Editor Interface.
Methods included from Resource::EnvironmentAware
Methods included from Resource::Refresher
Methods included from Resource
#array?, #default_locale, #environment_id, #fields, #nested_locale_fields?, #resource?, #save, #sys
Class Method Details
.create ⇒ Object
Creates an EditorInterface.
Not Supported
39 40 41 |
# File 'lib/contentful/management/editor_interface.rb', line 39 def self.create(*) fail 'Not supported' end |
.default(client, space_id, environment_id, content_type_id) ⇒ Contentful::Management::EditorInterface
Gets the Default Editor Interface
25 26 27 |
# File 'lib/contentful/management/editor_interface.rb', line 25 def self.default(client, space_id, environment_id, content_type_id) ClientEditorInterfaceMethodsFactory.new(client, space_id, environment_id, content_type_id).default end |
.find ⇒ Object
Finds an EditorInterface.
Not Supported
32 33 34 |
# File 'lib/contentful/management/editor_interface.rb', line 32 def self.find(*) fail 'Not supported' end |
Instance Method Details
#destroy ⇒ Object
Destroys an EditorInterface.
Not Supported
86 87 88 |
# File 'lib/contentful/management/editor_interface.rb', line 86 def destroy fail 'Not supported' end |
#update(attributes) ⇒ Contentful::Management::EditorInterface
Updates an Editor Interface
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/contentful/management/editor_interface.rb', line 66 def update(attributes) ResourceRequester.new(client, self.class).update( self, { space_id: space.id, environment_id: environment_id, content_type_id: content_type.id, editor_id: id }, { 'controls' => attributes[:controls] || controls, 'sidebar' => attributes.fetch(:sidebar, ) }.compact, version: sys[:version] ) end |