Skip to content

Commit

Permalink
update mkdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
grokify committed Sep 27, 2015
1 parent 1bc0440 commit 985c39c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/usage/messages/Call-Recordings.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@ response = rcsdk.platform.client.get do |req|
end

response.body['records'].each do |record|
# Retrieve call recording
response_file = rcsdk.platform.client.get do |req|
req.url record['recording']['contentUri']
end
filename = 'recording_' + record['id'] + '.mp3'
File.open(filename, 'wb') { |fp| fp.write(response_file.body) }
# Save call recording
filenameMp3 = 'recording_' + record['id'] + '.mp3'
File.open(filenameMp3, 'wb') { |fp| fp.write(response_file.body) }
# Save call log record (call recording metadata)
filenameJson = 'recording_' + record['id'] + '.json'
File.open(filenameJson, 'wb') { |fp| fp.write(record.to_json) }
end
```

0 comments on commit 985c39c

Please sign in to comment.