Method: Contentful::Management::Resource::ClassMethods#create
- Defined in:
- lib/contentful/management/resource.rb
#create(client, space_id, environment_id = nil, attributes = {}) ⇒ Contentful::Management::Resource
Creates a resource.
259 260 261 262 263 264 265 266 |
# File 'lib/contentful/management/resource.rb', line 259 def create(client, space_id, environment_id = nil, attributes = {}) = { space_id: space_id, environment_id: environment_id } [:resource_id] = attributes[:id] if attributes.respond_to?(:key) && attributes.key?(:id) ResourceRequester.new(client, self).create( , attributes ) end |