Commit 4f003111 authored by Greg Messner's avatar Greg Messner
Browse files

Fixed findNamespace(String, int, int).

parent 1a24aa33
...@@ -87,7 +87,7 @@ public class NamespaceApi extends AbstractApi { ...@@ -87,7 +87,7 @@ public class NamespaceApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Namespace> findNamespaces(String query, int page, int perPage) throws GitLabApiException { public List<Namespace> findNamespaces(String query, int page, int perPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("search", query, true).withParam(PAGE_PARAM, perPage).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"); Response response = get(Response.Status.OK, formData.asMap(), "namespaces");
return (response.readEntity(new GenericType<List<Namespace>>() {})); return (response.readEntity(new GenericType<List<Namespace>>() {}));
} }
...@@ -102,7 +102,7 @@ public class NamespaceApi extends AbstractApi { ...@@ -102,7 +102,7 @@ public class NamespaceApi extends AbstractApi {
* @return a Pager of Namespace instances with the matching namespaces * @return a Pager of Namespace instances with the matching namespaces
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Pager<Namespace> getNamespaces(String query, int itemsPerPage) throws GitLabApiException { public Pager<Namespace> findNamespaces(String query, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("search", query, true); GitLabApiForm formData = new GitLabApiForm().withParam("search", query, true);
return (new Pager<Namespace>(this, Namespace.class, itemsPerPage, formData.asMap(), "namespaces")); return (new Pager<Namespace>(this, Namespace.class, itemsPerPage, formData.asMap(), "namespaces"));
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment