public List<Branch> getBranches(Object projectIdOrPath, int page, int perPage) throws GitLabApiException {
        Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects",
                getProjectIdOrPath(projectIdOrPath), "repository", "branches");
        return (response.readEntity(new GenericType<List<Branch>>() {}));
    }
public List < Branch > getBranches ( Object projectIdOrPath , int page , int perPage ) throws GitLabApiException { Response response = get ( Response . Status . OK , getPageQueryParams ( page , perPage ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "repository" , "branches" ) ; return ( response . readEntity ( new GenericType < List < Branch > > ( ) { } ) ) ; }
Get a list of repository branches from a project, sorted by name alphabetically.

<pre><code>GitLab Endpoint: GET /projects/:id/repository/branches</code></pre>

@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param page the page to get
@param perPage the number of Branch instances per page
@return the list of repository branches for the specified project
@throws GitLabApiException if any exception occurs