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
37 38 39 |
# File 'lib/contentful/management/editor_interface.rb', line 37 def self.create(*) fail 'Not supported' end |
.default(client, space_id, environment_id, content_type_id) ⇒ Contentful::Management::EditorInterface
Gets the Default Editor Interface
23 24 25 |
# File 'lib/contentful/management/editor_interface.rb', line 23 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
30 31 32 |
# File 'lib/contentful/management/editor_interface.rb', line 30 def self.find(*) fail 'Not supported' end |
Instance Method Details
#destroy ⇒ Object
Destroys an EditorInterface.
Not Supported
84 85 86 |
# File 'lib/contentful/management/editor_interface.rb', line 84 def destroy fail 'Not supported' end |
#update(attributes) ⇒ Contentful::Management::EditorInterface
Updates an Editor Interface
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/contentful/management/editor_interface.rb', line 64 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[:sidebar] || }, version: sys[:version] ) end |