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
4f003111
Commit
4f003111
authored
Jun 24, 2017
by
Greg Messner
Browse files
Fixed findNamespace(String, int, int).
parent
1a24aa33
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/NamespaceApi.java
View file @
4f003111
...
...
@@ -87,7 +87,7 @@ public class NamespaceApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs
*/
public
List
<
Namespace
>
findNamespaces
(
String
query
,
int
page
,
int
perPage
)
throws
GitLabApiException
{
GitLabApiForm
formData
=
new
GitLabApiForm
().
withParam
(
"search"
,
query
,
true
).
withParam
(
PAGE_PARAM
,
p
erP
age
).
withParam
(
PER_PAGE_PARAM
,
perPage
);
GitLabApiForm
formData
=
new
GitLabApiForm
().
withParam
(
"search"
,
query
,
true
).
withParam
(
PAGE_PARAM
,
page
).
withParam
(
PER_PAGE_PARAM
,
perPage
);
Response
response
=
get
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
"namespaces"
);
return
(
response
.
readEntity
(
new
GenericType
<
List
<
Namespace
>>()
{}));
}
...
...
@@ -102,7 +102,7 @@ public class NamespaceApi extends AbstractApi {
* @return a Pager of Namespace instances with the matching namespaces
* @throws GitLabApiException if any exception occurs
*/
public
Pager
<
Namespace
>
get
Namespaces
(
String
query
,
int
itemsPerPage
)
throws
GitLabApiException
{
public
Pager
<
Namespace
>
find
Namespaces
(
String
query
,
int
itemsPerPage
)
throws
GitLabApiException
{
GitLabApiForm
formData
=
new
GitLabApiForm
().
withParam
(
"search"
,
query
,
true
);
return
(
new
Pager
<
Namespace
>(
this
,
Namespace
.
class
,
itemsPerPage
,
formData
.
asMap
(),
"namespaces"
));
}
...
...
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