Class: Sem::API::Users
Constant Summary
Constants inherited
from Base
Base::CREDENTIALS_PATH
Class Method Summary
collapse
list_for_org
add_to_team, list_for_team, remove_from_team
Methods inherited from Base
client
Class Method Details
.api ⇒ Object
17
18
19
|
# File 'lib/sem/api/users.rb', line 17
def self.api
client.users
end
|
.info(name) ⇒ Object
13
14
15
|
# File 'lib/sem/api/users.rb', line 13
def self.info(name)
list.find { |user| user[:id] == name }
end
|
.list ⇒ Object
7
8
9
10
11
|
# File 'lib/sem/api/users.rb', line 7
def self.list
org_names = Orgs.list.map { |org| org[:username] }
org_names.map { |name| list_for_org(name) }.flatten
end
|
.to_hash(user) ⇒ Object
21
22
23
|
# File 'lib/sem/api/users.rb', line 21
def self.to_hash(user)
{ :id => user.username }
end
|