Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
java-gitlab-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
沈俊林
java-gitlab-api
Commits
37391356
Commit
37391356
authored
Jul 07, 2014
by
Tim Olshansky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18 from dneves/master
added getUsers() and getUser( userId )
parents
be12b3a7
5b8ce2f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
4 deletions
+28
-4
GitlabAPI.java
src/main/java/org/gitlab/api/GitlabAPI.java
+28
-4
No files found.
src/main/java/org/gitlab/api/GitlabAPI.java
View file @
37391356
package
org
.
gitlab
.
api
;
package
org
.
gitlab
.
api
;
import
org.codehaus.jackson.map.DeserializationConfig
;
import
org.codehaus.jackson.map.ObjectMapper
;
import
org.gitlab.api.http.GitlabHTTPRequestor
;
import
org.gitlab.api.models.GitlabBranch
;
import
org.gitlab.api.models.GitlabCommit
;
import
org.gitlab.api.models.GitlabIssue
;
import
org.gitlab.api.models.GitlabMergeRequest
;
import
org.gitlab.api.models.GitlabMilestone
;
import
org.gitlab.api.models.GitlabNamespace
;
import
org.gitlab.api.models.GitlabNote
;
import
org.gitlab.api.models.GitlabProject
;
import
org.gitlab.api.models.GitlabProjectHook
;
import
org.gitlab.api.models.GitlabProjectMember
;
import
org.gitlab.api.models.GitlabSession
;
import
org.gitlab.api.models.GitlabUser
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.net.URL
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
org.codehaus.jackson.map.DeserializationConfig
;
import
org.codehaus.jackson.map.ObjectMapper
;
import
org.gitlab.api.http.GitlabHTTPRequestor
;
import
org.gitlab.api.http.Query
;
import
org.gitlab.api.http.Query
;
import
org.gitlab.api.models.*
;
import
org.gitlab.api.models.*
;
/**
/**
* Gitlab API Wrapper class
* Gitlab API Wrapper class
*
*
...
@@ -77,6 +91,16 @@ public class GitlabAPI {
...
@@ -77,6 +91,16 @@ public class GitlabAPI {
return
new
URL
(
_hostUrl
+
tailAPIUrl
);
return
new
URL
(
_hostUrl
+
tailAPIUrl
);
}
}
public
List
<
GitlabUser
>
getUsers
()
throws
IOException
{
String
tailUrl
=
GitlabUser
.
URL
;
return
retrieve
().
getAll
(
tailUrl
,
GitlabUser
[].
class
);
}
public
GitlabUser
getUser
(
Integer
userId
)
throws
IOException
{
String
tailUrl
=
GitlabUser
.
URL
+
"/"
+
userId
;
return
retrieve
().
to
(
tailUrl
,
GitlabUser
.
class
);
}
public
GitlabGroup
getGroup
(
Integer
groupId
)
throws
IOException
{
public
GitlabGroup
getGroup
(
Integer
groupId
)
throws
IOException
{
String
tailUrl
=
GitlabGroup
.
URL
+
"/"
+
groupId
;
String
tailUrl
=
GitlabGroup
.
URL
+
"/"
+
groupId
;
return
retrieve
().
to
(
tailUrl
,
GitlabGroup
.
class
);
return
retrieve
().
to
(
tailUrl
,
GitlabGroup
.
class
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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