Class: BulutfonSDK::REST::CallRecord

Inherits:
BaseRequest show all
Defined in:
lib/bulutfon_sdk/rest/call_record.rb

Constant Summary

Constants inherited from BaseRequest

BaseRequest::HTTP_HEADERS

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CallRecord



7
8
9
10
# File 'lib/bulutfon_sdk/rest/call_record.rb', line 7

def initialize(*args)
  super(*args)
  @resource = 'call-records'
end

Instance Method Details

#get(uuid, encrypt_token = false) ⇒ Object



12
13
14
15
# File 'lib/bulutfon_sdk/rest/call_record.rb', line 12

def get( uuid, encrypt_token = false )
  uri = prepare_uri("#{@resource}/#{uuid}", {encrypt_token: encrypt_token, id: uuid})
  { download_path: uri.to_s }
end

#get_stream(uuid, encrypt_token = false) ⇒ Object



17
18
19
20
# File 'lib/bulutfon_sdk/rest/call_record.rb', line 17

def get_stream( uuid, encrypt_token = false )
  uri = prepare_uri("#{@resource}/#{uuid}/stream", {encrypt_token: encrypt_token, id: uuid})
  { download_path: uri.to_s }
end

#save(uuid, save_path, encrypt_token = false) ⇒ Object



22
23
24
# File 'lib/bulutfon_sdk/rest/call_record.rb', line 22

def save( uuid, save_path, encrypt_token = false)
  save_file( 'get', "#{@resource}/#{uuid}", save_path, {encrypt_token: encrypt_token, id: uuid})
end