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
690dfc0c
Commit
690dfc0c
authored
Mar 17, 2014
by
Paul Weingardt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added getNamespaceMembers method
parent
cd037b61
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
GitlabAPI.java
src/main/java/org/gitlab/api/GitlabAPI.java
+22
-0
GitlabNamespace.java
src/main/java/org/gitlab/api/models/GitlabNamespace.java
+2
-1
No files found.
src/main/java/org/gitlab/api/GitlabAPI.java
View file @
690dfc0c
...
...
@@ -15,6 +15,7 @@ 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
;
...
...
@@ -300,4 +301,25 @@ public class GitlabAPI {
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
projectId
+
GitlabProjectMember
.
URL
;
return
Arrays
.
asList
(
retrieve
().
to
(
tailUrl
,
GitlabProjectMember
[].
class
));
}
/**
* This will fail, if the given namespace is a user and not a group
* @param namespace
* @return
* @throws IOException
*/
public
List
<
GitlabProjectMember
>
getNamespaceMembers
(
GitlabNamespace
namespace
)
throws
IOException
{
return
getNamespaceMembers
(
namespace
.
getId
());
}
/**
* This will fail, if the given namespace is a user and not a group
* @param namespaceId
* @return
* @throws IOException
*/
public
List
<
GitlabProjectMember
>
getNamespaceMembers
(
Integer
namespaceId
)
throws
IOException
{
String
tailUrl
=
GitlabNamespace
.
URL
+
"/"
+
namespaceId
+
GitlabProjectMember
.
URL
;
return
Arrays
.
asList
(
retrieve
().
to
(
tailUrl
,
GitlabProjectMember
[].
class
));
}
}
src/main/java/org/gitlab/api/models/GitlabNamespace.java
View file @
690dfc0c
...
...
@@ -4,6 +4,7 @@ import java.util.Date;
import
org.codehaus.jackson.annotate.JsonProperty
;
public
class
GitlabNamespace
{
public
static
final
String
URL
=
"/groups"
;
private
Integer
_id
;
private
String
_name
;
...
...
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