public class UserApi extends AbstractApi
Modifier and Type | Method and Description |
---|---|
User |
createUser(User user,
String password,
Integer projectsLimit)
Creates a new user.
|
void |
deleteUser(Integer userId)
Deletes a user.
|
void |
deleteUser(User user)
Deletes a user.
|
List<User> |
findUsers(String emailOrUsername)
Search users by Email or username
GET /users?search=:email_or_username
|
User |
getUser(int userId)
Get a single user.
|
List<User> |
getUsers()
Get a list of users.
|
List<User> |
getUsers(int page,
int perPage)
Get a list of users using the specified page and per page settings.
|
User |
modifyUser(User user,
String password,
Integer projectsLimit)
Modifies an existing user.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, handle, post, post, post, put, put, validate
public List<User> getUsers() throws GitLabApiException
GitLabApiException
- if any exception occurspublic List<User> getUsers(int page, int perPage) throws GitLabApiException
page
- the page to getperPage
- the number of users per pageGitLabApiException
- if any exception occurspublic User getUser(int userId) throws GitLabApiException
userId
- the ID of the user to getGitLabApiException
- if any exception occurspublic List<User> findUsers(String emailOrUsername) throws GitLabApiException
emailOrUsername
- the email or username to search forGitLabApiException
- if any exception occurspublic User createUser(User user, String password, Integer projectsLimit) throws GitLabApiException
user
- the User instance with the user info to createpassword
- the password for the new userprojectsLimit
- the maximum number of projectGitLabApiException
- if any exception occurspublic User modifyUser(User user, String password, Integer projectsLimit) throws GitLabApiException
user
- the User instance with the user info to modifypassword
- the new password for the userprojectsLimit
- the maximum number of projectGitLabApiException
- if any exception occurspublic void deleteUser(Integer userId) throws GitLabApiException
userId
- the user ID to deleteGitLabApiException
- if any exception occurspublic void deleteUser(User user) throws GitLabApiException
user
- the User instance to deleteGitLabApiException
- if any exception occursCopyright © 2017. All rights reserved.