Method: Happyscribe::Transcript#retrieve_export
- Defined in:
- lib/happyscribe.rb
#retrieve_export(export_id) ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/happyscribe.rb', line 97 def retrieve_export(export_id) endpoint = "#{@base}/exports/#{export_id}" uri = URI.parse(endpoint) request = Net::HTTP::Get.new(uri) request["Authorization"] = @auth = { use_ssl: uri.scheme == "https", } response = Net::HTTP.start(uri.hostname, uri.port, ) do |http| http.request(request) end return JSON.parse response.body end |