Class: Miniphonic::Production
- Includes:
- Attributes::Production
- Defined in:
- lib/miniphonic/production.rb
Instance Attribute Summary
Attributes included from Attributes::Production
#input_file, #output_basename, #preset, #upload_service
Attributes inherited from ApiObject
Instance Method Summary collapse
- #create_from_preset(preset) ⇒ Object
- #endpoint ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
- #upload_audio(path) ⇒ Object
-
#upload_audio_from_service(filename, service) ⇒ Object
If your file is on a service registered with Auphonic, use this to not have to upload by hand.
Methods included from Attributes::Production
#algorithms, #attributes_to_payload, #chapters, #metadata, #multi_input_files, #outgoing_services, #output_files, #payload_to_attributes
Methods inherited from ApiObject
all, #attributes_to_payload, #collection_endpoint, #collection_url, #command, #command_url, #create, #delete, #get_attributes, #initialize, #payload_to_attributes, #single_url, #update, #upload_cover
Methods included from Helpers
#delete_from_server, #from_server, #handle_response, #path_to_payload, #server_error, #to_server
Constructor Details
This class inherits a constructor from Miniphonic::ApiObject
Instance Method Details
#create_from_preset(preset) ⇒ Object
11 12 13 14 15 |
# File 'lib/miniphonic/production.rb', line 11 def create_from_preset(preset) self.preset = preset self.create self.get_attributes end |
#endpoint ⇒ Object
7 8 9 |
# File 'lib/miniphonic/production.rb', line 7 def endpoint "production" end |
#start ⇒ Object
30 31 32 |
# File 'lib/miniphonic/production.rb', line 30 def start command :start end |
#stop ⇒ Object
34 35 36 |
# File 'lib/miniphonic/production.rb', line 34 def stop command :stop end |
#upload_audio(path) ⇒ Object
17 18 19 |
# File 'lib/miniphonic/production.rb', line 17 def upload_audio(path) command :upload, path_to_payload(path, :input_file) end |
#upload_audio_from_service(filename, service) ⇒ Object
If your file is on a service registered with Auphonic, use this to not have to upload by hand.
24 25 26 27 28 |
# File 'lib/miniphonic/production.rb', line 24 def upload_audio_from_service(filename, service) self.input_file = filename self.upload_service = service update end |