Class: CiscoWebex::Locations

Inherits:
Calling
  • Object
show all
Defined in:
lib/Calling/Locations.rb

Instance Method Summary collapse

Methods inherited from Calling

#call_control, #calls, #head, #me, #post, #put, #voicemail

Constructor Details

#initialize(token = nil) ⇒ Locations

initialize object with stored token



6
7
8
9
10
11
12
13
# File 'lib/Calling/Locations.rb', line 6

def initialize(token=nil)
	if token == nil
		STDERR.puts "Must provide API key for CiscoWebex::Calling::Locations"
		return false
	else
		@auth_token = token if token
	end
end

Instance Method Details

#create(params) ⇒ Object



31
32
33
# File 'lib/Calling/Locations.rb', line 31

def create(params)
	return CiscoWebex::Rest.post(@auth_token, "/v1/locations", params) rescue false
end

#delete(id) ⇒ Object



35
36
37
# File 'lib/Calling/Locations.rb', line 35

def delete(id)
	return CiscoWebex::Rest.delete(@auth_token, "/v1/locations", id) rescue false
end

#get(id) ⇒ Object



19
20
21
# File 'lib/Calling/Locations.rb', line 19

def get(id)
	return CiscoWebex::Rest.get(@auth_token, "/v1/locations/#{id}", {}, limit).data rescue false
end

#list(params = {}, limit = 5000) ⇒ Object



23
24
25
# File 'lib/Calling/Locations.rb', line 23

def list(params={}, limit=5000)
	return CiscoWebex::Rest.get(@auth_token, "/v1/locations", params, limit).data rescue false
end

#patch(params, id = nil) ⇒ Object



43
44
45
46
# File 'lib/Calling/Locations.rb', line 43

def patch(params, id=nil)
	STDERR.puts "CiscoWebex::Calling::Locations.patch() - Metod not implemented"
	return False
end

#search(params = {}, limit = 5000) ⇒ Object



27
28
29
# File 'lib/Calling/Locations.rb', line 27

def search(params={}, limit=5000)
	return CiscoWebex::Rest.get(@auth_token, "/v1/locations", params, limit).data rescue false				
end

#thisObject



15
16
17
# File 'lib/Calling/Locations.rb', line 15

def this()
	puts "CiscoWebex::Calling::Locations"
end

#update(params) ⇒ Object



39
40
41
# File 'lib/Calling/Locations.rb', line 39

def update(params)
	return CiscoWebex::Rest.put(@auth_token, "/v1/locations", params) rescue false
end