Module: Supercast::Operations::Create

Included in:
DataList, Episode, Role, Subscriber
Defined in:
lib/supercast/operations/create.rb

Instance Method Summary collapse

Instance Method Details

#create(params = {}, opts = {}) ⇒ Object

Creates an API resource.

Attributes

  • params - A hash of parameters to pass to the API

  • opts - A Hash of additional options (separate from the params / object values) to be added to the request.



13
14
15
16
# File 'lib/supercast/operations/create.rb', line 13

def create(params = {}, opts = {})
  resp, opts = request(:post, resource_url, Hash[object_name => params], opts)
  Util.convert_to_supercast_object(resp.data, opts)
end