code: public Pager<Event> getUserEvents(Object userIdOrUsername, ActionType action, TargetType targetType, Date before, Date after,
              SortOrder sortOrder, int itemsPerPage) 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);
  
          return (new Pager<Event>(this, Event.class, itemsPerPage, formData.asMap(),
                  "users", getUserIdOrUsername(userIdOrUsername), "events"));
      }
docs: Get a list of events for the specified user and in the specified page range.
  
  <pre><code>GitLab Endpoint: GET /users/:userId/events</code></pre>
  
  @param userIdOrUsername the user ID, username of the user, or a User instance holding the user ID or username
  @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 itemsPerPage the number of Event instances that will be fetched per page
  @return a Pager of events for the specified user and matching the supplied parameters
  @throws GitLabApiException if any exception occurs