From 4f00311126d8e708422e8b304a2c1173dd484034 Mon Sep 17 00:00:00 2001 From: Greg Messner Date: Sat, 24 Jun 2017 18:07:14 -0700 Subject: [PATCH] Fixed findNamespace(String, int, int). --- src/main/java/org/gitlab4j/api/NamespaceApi.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gitlab4j/api/NamespaceApi.java b/src/main/java/org/gitlab4j/api/NamespaceApi.java index 339d0e85..9872b161 100644 --- a/src/main/java/org/gitlab4j/api/NamespaceApi.java +++ b/src/main/java/org/gitlab4j/api/NamespaceApi.java @@ -87,7 +87,7 @@ public class NamespaceApi extends AbstractApi { * @throws GitLabApiException if any exception occurs */ public List 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"); return (response.readEntity(new GenericType>() {})); } @@ -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 getNamespaces(String query, int itemsPerPage) throws GitLabApiException { + public Pager findNamespaces(String query, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("search", query, true); return (new Pager(this, Namespace.class, itemsPerPage, formData.asMap(), "namespaces")); } -- GitLab