Class EventsApi

  • All Implemented Interfaces:
    Constants

    public class EventsApi
    extends AbstractApi
    This class implements the client side API for the GitLab events calls.
    • Constructor Detail

      • EventsApi

        public EventsApi​(GitLabApi gitLabApi)
    • Method Detail

      • getAuthenticatedUserEvents

        public java.util.List<Event> getAuthenticatedUserEvents​(Constants.ActionType action,
                                                                Constants.TargetType targetType,
                                                                java.util.Date before,
                                                                java.util.Date after,
                                                                Constants.SortOrder sortOrder)
                                                         throws GitLabApiException
        Get a list of events for the authenticated user.
        GitLab Endpoint: GET /events
        Parameters:
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        Returns:
        a list of events for the authenticated user and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getAllAuthenticatedUserEvents

        public java.util.List<Event> getAllAuthenticatedUserEvents​(Constants.ActionType action,
                                                                   Constants.TargetType targetType,
                                                                   java.util.Date before,
                                                                   java.util.Date after,
                                                                   Constants.SortOrder sortOrder)
                                                            throws GitLabApiException
        Get a list of all events for the authenticated user, across all of the user's projects.
        GitLab Endpoint: GET /events
        Parameters:
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        Returns:
        a list of events for the authenticated user and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getAuthenticatedUserEvents

        public java.util.List<Event> getAuthenticatedUserEvents​(Constants.ActionType action,
                                                                Constants.TargetType targetType,
                                                                java.util.Date before,
                                                                java.util.Date after,
                                                                Constants.SortOrder sortOrder,
                                                                int page,
                                                                int perPage)
                                                         throws GitLabApiException
        Get a list of events for the authenticated user and in the specified page range.
        GitLab Endpoint: GET /events
        Parameters:
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        page - the page to get
        perPage - the number of projects per page
        Returns:
        a list of events for the authenticated user and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getAuthenticatedUserEvents

        public java.util.List<Event> getAuthenticatedUserEvents​(Constants.ActionType action,
                                                                Constants.TargetType targetType,
                                                                java.util.Date before,
                                                                java.util.Date after,
                                                                Constants.SortOrder sortOrder,
                                                                int page,
                                                                int perPage,
                                                                Constants.EventScope scope)
                                                         throws GitLabApiException
        Get a list of events for the authenticated user and in the specified page range.
        GitLab Endpoint: GET /events
        Parameters:
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        page - the page to get
        perPage - the number of projects per page
        scope - include all events across a user’s projects, optional
        Returns:
        a list of events for the authenticated user and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getAuthenticatedUserEvents

        public Pager<Event> getAuthenticatedUserEvents​(Constants.ActionType action,
                                                       Constants.TargetType targetType,
                                                       java.util.Date before,
                                                       java.util.Date after,
                                                       Constants.SortOrder sortOrder,
                                                       int itemsPerPage)
                                                throws GitLabApiException
        Get a list of events for the authenticated user and in the specified page range.
        GitLab Endpoint: GET /events
        Parameters:
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        itemsPerPage - the number of Event instances that will be fetched per page
        Returns:
        a Pager of events for the authenticated user and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getAuthenticatedUserEvents

        public Pager<Event> getAuthenticatedUserEvents​(Constants.ActionType action,
                                                       Constants.TargetType targetType,
                                                       java.util.Date before,
                                                       java.util.Date after,
                                                       Constants.SortOrder sortOrder,
                                                       int itemsPerPage,
                                                       Constants.EventScope scope)
                                                throws GitLabApiException
        Get a list of events for the authenticated user and in the specified page range.
        GitLab Endpoint: GET /events
        Parameters:
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        itemsPerPage - the number of Event instances that will be fetched per page
        scope - include all events across a user’s projects, optional
        Returns:
        a Pager of events for the authenticated user and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getAuthenticatedUserEventsStream

        public java.util.stream.Stream<Event> getAuthenticatedUserEventsStream​(Constants.ActionType action,
                                                                               Constants.TargetType targetType,
                                                                               java.util.Date before,
                                                                               java.util.Date after,
                                                                               Constants.SortOrder sortOrder)
                                                                        throws GitLabApiException
        Get a Stream of events for the authenticated user.
        GitLab Endpoint: GET /events
        Parameters:
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        Returns:
        a Stream of events for the authenticated user and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getAllAuthenticatedUserEventsStream

        public java.util.stream.Stream<Event> getAllAuthenticatedUserEventsStream​(Constants.ActionType action,
                                                                                  Constants.TargetType targetType,
                                                                                  java.util.Date before,
                                                                                  java.util.Date after,
                                                                                  Constants.SortOrder sortOrder)
                                                                           throws GitLabApiException
        Get a Stream of all events for the authenticated user, across all of the user's projects.
        GitLab Endpoint: GET /events
        Parameters:
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        Returns:
        a Stream of events for the authenticated user and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getUserEvents

        public java.util.List<Event> getUserEvents​(java.lang.Object userIdOrUsername,
                                                   Constants.ActionType action,
                                                   Constants.TargetType targetType,
                                                   java.util.Date before,
                                                   java.util.Date after,
                                                   Constants.SortOrder sortOrder)
                                            throws GitLabApiException
        Get a list of events for the specified user.
        GitLab Endpoint: GET /users/:userId/events
        Parameters:
        userIdOrUsername - the user ID, username of the user, or a User instance holding the user ID or username
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        Returns:
        a list of events for the specified user and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getUserEvents

        public java.util.List<Event> getUserEvents​(java.lang.Object userIdOrUsername,
                                                   Constants.ActionType action,
                                                   Constants.TargetType targetType,
                                                   java.util.Date before,
                                                   java.util.Date after,
                                                   Constants.SortOrder sortOrder,
                                                   int page,
                                                   int perPage)
                                            throws GitLabApiException
        Get a list of events for the specified user and in the specified page range.
        GitLab Endpoint: GET /users/:userId/events
        Parameters:
        userIdOrUsername - the user ID, username of the user, or a User instance holding the user ID or username
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        page - the page to get
        perPage - the number of projects per page
        Returns:
        a list of events for the specified user and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getUserEvents

        public Pager<Event> getUserEvents​(java.lang.Object userIdOrUsername,
                                          Constants.ActionType action,
                                          Constants.TargetType targetType,
                                          java.util.Date before,
                                          java.util.Date after,
                                          Constants.SortOrder sortOrder,
                                          int itemsPerPage)
                                   throws GitLabApiException
        Get a list of events for the specified user and in the specified page range.
        GitLab Endpoint: GET /users/:userId/events
        Parameters:
        userIdOrUsername - the user ID, username of the user, or a User instance holding the user ID or username
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        itemsPerPage - the number of Event instances that will be fetched per page
        Returns:
        a Pager of events for the specified user and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getUserEventsStream

        public java.util.stream.Stream<Event> getUserEventsStream​(java.lang.Object userIdOrUsername,
                                                                  Constants.ActionType action,
                                                                  Constants.TargetType targetType,
                                                                  java.util.Date before,
                                                                  java.util.Date after,
                                                                  Constants.SortOrder sortOrder)
                                                           throws GitLabApiException
        Get a Stream of events for the specified user.
        GitLab Endpoint: GET /users/:userId/events
        Parameters:
        userIdOrUsername - the user ID, username of the user, or a User instance holding the user ID or username
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        Returns:
        a Stream of events for the specified user and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getProjectEvents

        public java.util.List<Event> getProjectEvents​(java.lang.Object projectIdOrPath,
                                                      Constants.ActionType action,
                                                      Constants.TargetType targetType,
                                                      java.util.Date before,
                                                      java.util.Date after,
                                                      Constants.SortOrder sortOrder)
                                               throws GitLabApiException
        Get a list of events for the specified project.
        GitLab Endpoint: GET /:projectId/events
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        Returns:
        a list of events for the specified project and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getProjectEvents

        public java.util.List<Event> getProjectEvents​(java.lang.Object projectIdOrPath,
                                                      Constants.ActionType action,
                                                      Constants.TargetType targetType,
                                                      java.util.Date before,
                                                      java.util.Date after,
                                                      Constants.SortOrder sortOrder,
                                                      int page,
                                                      int perPage)
                                               throws GitLabApiException
        Get a list of events for the specified project and in the specified page range.
        GitLab Endpoint: GET /projects/:projectId/events
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        page - the page to get
        perPage - the number of projects per page
        Returns:
        a list of events for the specified project and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getProjectEvents

        public Pager<Event> getProjectEvents​(java.lang.Object projectIdOrPath,
                                             Constants.ActionType action,
                                             Constants.TargetType targetType,
                                             java.util.Date before,
                                             java.util.Date after,
                                             Constants.SortOrder sortOrder,
                                             int itemsPerPage)
                                      throws GitLabApiException
        Get a list of events for the specified project and in the specified page range.
        GitLab Endpoint: GET /projects/:projectId/events
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        itemsPerPage - the number of Event instances that will be fetched per page
        Returns:
        a Pager of events for the specified project and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs
      • getProjectEventsStream

        public java.util.stream.Stream<Event> getProjectEventsStream​(java.lang.Object projectIdOrPath,
                                                                     Constants.ActionType action,
                                                                     Constants.TargetType targetType,
                                                                     java.util.Date before,
                                                                     java.util.Date after,
                                                                     Constants.SortOrder sortOrder)
                                                              throws GitLabApiException
        Get a Stream of events for the specified project.
        GitLab Endpoint: GET /:projectId/events
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        action - include only events of a particular action type, optional
        targetType - include only events of a particular target type, optional
        before - include only events created before a particular date, optional
        after - include only events created after a particular date, optional
        sortOrder - sort events in ASC or DESC order by created_at. Default is DESC, optional
        Returns:
        a Stream of events for the specified project and matching the supplied parameters
        Throws:
        GitLabApiException - if any exception occurs