Class: Youtrack::User
- Inherits:
-
Base
- Object
- Base
- Youtrack::User
show all
- Defined in:
- lib/youtrack/resources/user.rb
Instance Attribute Summary
Attributes inherited from Base
#base_url, #response, #service
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Constructor Details
This class inherits a constructor from Youtrack::Base
Instance Method Details
#all ⇒ Object
41
42
43
44
|
# File 'lib/youtrack/resources/user.rb', line 41
def all
get("admin/user")
response.parsed_response
end
|
#create(attributes) ⇒ Object
login string Login name of a user to be created. Required. fullName string User full name (optional). email string User email (required for new user). jabber string User jabber account (optional). password string Password for the new user. If skipped, by default the new user account will be created with auto-generated password
51
52
53
54
|
# File 'lib/youtrack/resources/user.rb', line 51
def create(attributes)
put("admin/user", body: attributes)
response
end
|
#current ⇒ Object
8
9
10
11
|
# File 'lib/youtrack/resources/user.rb', line 8
def current
get('user/current')
response.parsed_response
end
|
#destroy(login_name) ⇒ Object
62
63
64
65
|
# File 'lib/youtrack/resources/user.rb', line 62
def destroy(login_name)
delete("admin/user/#{login_name}")
response
end
|
#find(login_name) ⇒ Object
36
37
38
39
|
# File 'lib/youtrack/resources/user.rb', line 36
def find(login_name)
get("admin/user/#{login_name}")
response.parsed_response
end
|
#get_by_login(login_name) ⇒ Object
13
14
15
16
|
# File 'lib/youtrack/resources/user.rb', line 13
def get_by_login(login_name)
get("user/#{login_name}")
response.parsed_response
end
|
#get_groups_for(login_name) ⇒ Object
72
73
74
75
|
# File 'lib/youtrack/resources/user.rb', line 72
def get_groups_for(login_name)
get("admin/user/#{login_name}/groups")
response.parsed_response
end
|
#get_roles_for(login_name) ⇒ Object
67
68
69
70
|
# File 'lib/youtrack/resources/user.rb', line 67
def get_roles_for(login_name)
get("admin/user/#{login_name}/roles")
response.parsed_response
end
|
#get_saved_search_by_name(query_name) ⇒ Object
28
29
30
31
|
# File 'lib/youtrack/resources/user.rb', line 28
def get_saved_search_by_name(query_name)
get("user/search/#{query_name}")
response.parsed_response
end
|
#get_saved_searches ⇒ Object
23
24
25
26
|
# File 'lib/youtrack/resources/user.rb', line 23
def get_saved_searches
get("user/search")
response.parsed_response
end
|
#get_saved_searches_for(login_name) ⇒ Object
18
19
20
21
|
# File 'lib/youtrack/resources/user.rb', line 18
def get_saved_searches_for(login_name)
get("user/#{login_name}/filter")
response.parsed_response
end
|
#update(attributes) ⇒ Object
User will be created if not already exist
57
58
59
60
|
# File 'lib/youtrack/resources/user.rb', line 57
def update(attributes)
post("admin/user", body: attributes)
response
end
|