Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
953ac4af
Commit
953ac4af
authored
Aug 08, 2017
by
Greg Messner
Browse files
Added getCurrentUser().
parent
2e2c67fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/UserApi.java
View file @
953ac4af
...
@@ -215,6 +215,19 @@ public class UserApi extends AbstractApi {
...
@@ -215,6 +215,19 @@ public class UserApi extends AbstractApi {
deleteUser
(
user
.
getId
());
deleteUser
(
user
.
getId
());
}
}
/**
* Get currently authenticated user.
*
* GET /user
*
* @return the User instance for the currently authenticated user
* @throws GitLabApiException if any exception occurs
*/
public
User
getCurrentUser
()
throws
GitLabApiException
{
Response
response
=
get
(
Response
.
Status
.
OK
,
null
,
"user"
);
return
(
response
.
readEntity
(
User
.
class
));
}
/**
/**
* Get a list of currently authenticated user's SSH keys.
* Get a list of currently authenticated user's SSH keys.
*
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment