Module: Rubyhorn::RestClient::Ingest

Included in:
MatterhornClient
Defined in:
lib/rubyhorn/rest_client/ingest.rb

Instance Method Summary collapse

Instance Method Details

#addMediaPackage(file, params) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/rubyhorn/rest_client/ingest.rb', line 3

def addMediaPackage(file, params)
  raise "Missing required field flavor" unless params.include? "flavor"
  raise "Missing required field title" unless params.include? "title"

  uri = "ingest/addMediaPackage" + (params["workflow"].nil? ? "" : "/#{params["workflow"]}")
  return Rubyhorn::Workflow.from_xml multipart_post(uri, file, params)
end