Class: CiscoWebex::Calls
Instance Method Summary
collapse
Methods inherited from Calling
#call_control, #calls, #head, #me, #post, #put, #voicemail
Constructor Details
#initialize(token = nil) ⇒ Calls
initialize object with stored token
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/Calling/Calls.rb', line 6
def initialize(token=nil)
if not token
raise "Must provide API key"
else
if ! token
raise "CiscoWebex::Calling::Calls API Token not valid!"
else
@auth_token = token
end
end
end
|
Instance Method Details
#get(call_id = nil) ⇒ Object
26
27
28
29
30
31
32
33
|
# File 'lib/Calling/Calls.rb', line 26
def get(call_id=nil)
if call_id
return CiscoWebex::Rest.get(@auth_token, "/v1/telephony/calls/#{call_id}")
else
STDERR.puts "CiscoWebex::Calling::Calls.get(): Must caontain `call_id`"
return false
end
end
|
#history(params = []) ⇒ Object
40
41
42
|
# File 'lib/Calling/Calls.rb', line 40
def history(params=[])
return CiscoWebex::Rest.get(@auth_token, "/v1/telephony/history?#{",".join(params)}")
end
|
#list ⇒ Object
22
23
24
|
# File 'lib/Calling/Calls.rb', line 22
def list()
return CiscoWebex::Rest.get(@auth_token, "/v1/telephony/calls")
end
|
#search(params = {}) ⇒ Object
35
36
37
38
|
# File 'lib/Calling/Calls.rb', line 35
def search(params={})
params = { "personality"=> params } if params.class == String
return CiscoWebex::Toolbox.search(list(), params)
end
|
#this ⇒ Object
18
19
20
|
# File 'lib/Calling/Calls.rb', line 18
def this()
puts "CiscoWebex::Calling::Calls"
end
|