public class UserApi extends AbstractApi
Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.SortOrder
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
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
|
Pager<User> |
findUsers(String emailOrUsername,
int itemsPerPage)
Search users by Email or username and return a Pager
GET /users?search=:email_or_username
|
List<User> |
findUsers(String emailOrUsername,
int page,
int perPage)
Search users by Email or username in the specified page range.
|
User |
getUser(int userId)
Get a single user.
|
List<User> |
getUsers()
Get a list of users.
|
Pager<User> |
getUsers(int itemsPerPage)
Get a Pager 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, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getPageQueryParams, handle, isApiVersion, post, post, post, put, put, urlEncode, 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 Pager<User> getUsers(int itemsPerPage) throws GitLabApiException
itemsPerPage
- the number of Project instances that will be fetched 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 List<User> findUsers(String emailOrUsername, int page, int perPage) throws GitLabApiException
emailOrUsername
- the email or username to search forpage
- the page to getperPage
- the number of users per pageGitLabApiException
- if any exception occurspublic Pager<User> findUsers(String emailOrUsername, int itemsPerPage) throws GitLabApiException
emailOrUsername
- the email or username to search foritemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- 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.