gitlab4j-api icon indicating copy to clipboard operation
gitlab4j-api copied to clipboard

The first page in the API of V3 is not always 1

Open leonnnnna opened this issue 4 years ago • 0 comments

I have been using the gitlab API recently and found that I cannot get the data. After investigation, it is found that the paging of the api starts from 0, although the first page of most APIs is indeed 1. But when calling CommitsApi.getCommits, the first page is 0, it is recommended to expand and change the initial page.

  • package org.gitlab4j.api
  • class Pager
  • about line 90
// Set the page param to 1
        pageParam = new ArrayList<>();
        pageParam.add("1");
        queryParams.put(PAGE_PARAM, pageParam);
        Response response = api.get(Response.Status.OK, queryParams, pathArgs);

leonnnnna avatar Oct 28 '21 03:10 leonnnnna