public List<Event> getProjectEvents(Integer projectIdOrPath, ActionType action, TargetType targetType,
            Date before, Date after, SortOrder sortOrder, int page, int perPage) throws GitLabApiException {

        GitLabApiForm formData = new GitLabApiForm()
                .withParam("action", action)
                .withParam("target_type", targetType != null ? targetType.toValue().toLowerCase() : null)
                .withParam("before", before)
                .withParam("after", after)
                .withParam("sort", sortOrder)
                .withParam(PAGE_PARAM,  page)
                .withParam(PER_PAGE_PARAM, perPage);

        Response response = get(Response.Status.OK, formData.asMap(),
                "projects", getProjectIdOrPath(projectIdOrPath), "events");
        return (response.readEntity(new GenericType<List<Event>>() {}));
    }
public List < Event > getProjectEvents ( Integer projectIdOrPath , ActionType action , TargetType targetType , Date before , Date after , SortOrder sortOrder , int page , int perPage ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "action" , action ) . withParam ( "target_type" , targetType != null ? targetType . toValue ( ) . toLowerCase ( ) : null ) . withParam ( "before" , before ) . withParam ( "after" , after ) . withParam ( "sort" , sortOrder ) . withParam ( PAGE_PARAM , page ) . withParam ( PER_PAGE_PARAM , perPage ) ; Response response = get ( Response . Status . OK , formData . asMap ( ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "events" ) ; return ( response . readEntity ( new GenericType < List < Event > > ( ) { } ) ) ; }
Get a list of events for the specified project and in the specified page range.

<pre><code>GitLab Endpoint: GET /projects/:projectId/events</code></pre>

@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param action include only events of a particular action type, optional
@param targetType include only events of a particular target type, optional
@param before include only events created before a particular date, optional
@param after include only events created after a particular date, optional
@param sortOrder sort events in ASC or DESC order by created_at. Default is DESC, optional
@param page the page to get
@param perPage the number of projects per page
@return a list of events for the specified project and matching the supplied parameters
@throws GitLabApiException if any exception occurs