diff --git a/src/main/java/org/gitlab4j/api/NamespaceApi.java b/src/main/java/org/gitlab4j/api/NamespaceApi.java index 339d0e85dad1d9f165022534de472504d9c0d51c..9872b16118cf3b71d08ba6001a15ea190295613e 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")); }