Class: CiscoWebex::Roles

Inherits:
Admin
  • Object
show all
Defined in:
lib/Admin/Roles.rb

Constant Summary

Constants inherited from Admin

Admin::BASE_URL

Instance Method Summary collapse

Methods inherited from Admin

#audit_events, #authorizations, #head, #licenses, #me, #organizations, #people, #post, #put, #resource_groups, #roles

Constructor Details

#initialize(token = nil) ⇒ Roles

initialize object with stored token



7
8
9
10
11
12
13
14
15
# File 'lib/Admin/Roles.rb', line 7

def initialize(token=nil)
	if token == nil
		STDERR.puts "Must provide API key for CiscoWebex::Admin::Roles"
		return false
	else
		@auth_token = token if token
		@memberships = Memberships.new(@auth_token)
	end
end

Instance Method Details

#create(params) ⇒ Object



39
40
41
42
# File 'lib/Admin/Roles.rb', line 39

def create(params)
	STDERR.puts "CiscoWebex::Admin::Roles.create() - Metod not implemented"
	return False
end

#delete(id) ⇒ Object



44
45
46
47
# File 'lib/Admin/Roles.rb', line 44

def delete(id)
	STDERR.puts "CiscoWebex::Admin::Roles.delete() - Metod not implemented"
	return False
end

#get(id) ⇒ Object



26
27
28
# File 'lib/Admin/Roles.rb', line 26

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

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



30
31
32
# File 'lib/Admin/Roles.rb', line 30

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

#patch(params, id = nil) ⇒ Object



54
55
56
57
# File 'lib/Admin/Roles.rb', line 54

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

#search(params = {}) ⇒ Object



34
35
36
37
# File 'lib/Admin/Roles.rb', line 34

def search(params={})
	params = { "name"=> params } if params.class == String
	return CiscoWebex::Toolbox.search(list(), params)
end

#templateObject



21
22
23
24
# File 'lib/Admin/Roles.rb', line 21

def template()
	STDERR.puts "CiscoWebex::Admin::Roles.template() - Metod not implemented"
	return False
end

#thisObject



17
18
19
# File 'lib/Admin/Roles.rb', line 17

def this()
	puts "CiscoWebex::Admin::ResourceGroups"
end

#update(params) ⇒ Object



49
50
51
52
# File 'lib/Admin/Roles.rb', line 49

def update(params)
	STDERR.puts "CiscoWebex::Admin::Roles.update() - Metod not implemented"
	return False
end