Class: Nexmo::Files
- Inherits:
-
Namespace
- Object
- Namespace
- Nexmo::Files
- Defined in:
- lib/nexmo/files.rb
Instance Method Summary collapse
Instance Method Details
#get(id) ⇒ Object
7 8 9 |
# File 'lib/nexmo/files.rb', line 7 def get(id) request('/v1/files/' + id.split('/').last) end |
#save(id, filename) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/nexmo/files.rb', line 11 def save(id, filename) request('/v1/files/' + id.split('/').last) do |response| File.open(filename, 'wb') do |file| response.read_body do |chunk| file.write(chunk) end end end end |