Class: Auphonic::Production

Inherits:
Base
  • Object
show all
Defined in:
lib/auphonic/production.rb

Instance Attribute Summary

Attributes inherited from Base

#data

Instance Method Summary collapse

Methods inherited from Base

all, #uuid

Instance Method Details

#downloadObject



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

#reloadObject



19
20
21
22
# File 'lib/auphonic/production.rb', line 19

def reload
  self.data = Endpoint.instance.load_production(uuid)
  self
end

#saveObject



4
5
6
7
# File 'lib/auphonic/production.rb', line 4

def save
  self.data = Endpoint.instance.create_production(self.data)
  self
end

#startObject



14
15
16
17
# File 'lib/auphonic/production.rb', line 14

def start
  self.data = Endpoint.instance.start_production(uuid)
  self
end

#statusObject



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