Class: Auphonic::Production
- Defined in:
- lib/auphonic/production.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #download ⇒ Object
- #reload ⇒ Object
- #save ⇒ Object
- #start ⇒ Object
- #status ⇒ Object
- #upload(path) ⇒ Object
Methods inherited from Base
Instance Method Details
#download ⇒ Object
24 25 26 27 28 |
# File 'lib/auphonic/production.rb', line 24 def download data['output_files'].map do |out| Endpoint.instance.download(out['download_url']) end end |
#reload ⇒ Object
19 20 21 22 |
# File 'lib/auphonic/production.rb', line 19 def reload self.data = Endpoint.instance.load_production(uuid) self end |
#save ⇒ Object
4 5 6 7 |
# File 'lib/auphonic/production.rb', line 4 def save self.data = Endpoint.instance.create_production(self.data) self end |
#start ⇒ Object
14 15 16 17 |
# File 'lib/auphonic/production.rb', line 14 def start self.data = Endpoint.instance.start_production(uuid) self end |
#status ⇒ Object
30 31 32 |
# File 'lib/auphonic/production.rb', line 30 def status data['status_string'] end |
#upload(path) ⇒ Object
9 10 11 12 |
# File 'lib/auphonic/production.rb', line 9 def upload(path) self.data = Endpoint.instance.upload_to_production(uuid, path) self end |