Method: Happyscribe::Transcript#export_in_txt
- Defined in:
- lib/happyscribe.rb
#export_in_txt(export_id) ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/happyscribe.rb', line 112 def export_in_txt(export_id) export = create_export(export_id,"txt")["id"] sleep(5) while true retrieved = retrieve_export(export) if(retrieved["state"]=="ready") break else sleep(2) end end txt = URI.parse(retrieved["download_link"]).open.read.force_encoding("utf-8") return txt end |