Package org.gitlab4j.api
Class EventsApi
java.lang.Object
org.gitlab4j.api.AbstractApi
org.gitlab4j.api.EventsApi
- All Implemented Interfaces:
Constants
This class implements the client side API for the GitLab events calls.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gitlab4j.api.Constants
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.ContributorOrderBy, Constants.DeploymentOrderBy, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, Constants.EventScope, Constants.GroupOrderBy, Constants.GroupSearchScope, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestSearchIn, Constants.MergeRequestState, Constants.MilestoneState, Constants.PackageOrderBy, Constants.PackageStatus, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, Constants.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
-
Field Summary
Fields inherited from class org.gitlab4j.api.AbstractApi
gitLabApi
Fields inherited from interface org.gitlab4j.api.Constants
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAllAuthenticatedUserEvents
(Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder) Get a list of all events for the authenticated user, across all of the user's projects.getAllAuthenticatedUserEventsStream
(Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder) Get a Stream of all events for the authenticated user, across all of the user's projects.getAuthenticatedUserEvents
(Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder) Get a list of events for the authenticated user.getAuthenticatedUserEvents
(Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder, int itemsPerPage) Get a list of events for the authenticated user and in the specified page range.getAuthenticatedUserEvents
(Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder, int page, int perPage) Get a list of events for the authenticated user and in the specified page range.getAuthenticatedUserEvents
(Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder, int page, int perPage, Constants.EventScope scope) Get a list of events for the authenticated user and in the specified page range.getAuthenticatedUserEvents
(Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder, int itemsPerPage, Constants.EventScope scope) Get a list of events for the authenticated user and in the specified page range.getAuthenticatedUserEventsStream
(Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder) Get a Stream of events for the authenticated user.getProjectEvents
(Object projectIdOrPath, Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder) Get a list of events for the specified project.getProjectEvents
(Object projectIdOrPath, Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder, int itemsPerPage) Get a list of events for the specified project and in the specified page range.getProjectEvents
(Object projectIdOrPath, Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder, int page, int perPage) Get a list of events for the specified project and in the specified page range.getProjectEventsStream
(Object projectIdOrPath, Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder) Get a Stream of events for the specified project.getUserEvents
(Object userIdOrUsername, Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder) Get a list of events for the specified user.getUserEvents
(Object userIdOrUsername, Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder, int itemsPerPage) Get a list of events for the specified user and in the specified page range.getUserEvents
(Object userIdOrUsername, Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder, int page, int perPage) Get a list of events for the specified user and in the specified page range.getUserEventsStream
(Object userIdOrUsername, Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder) Get a Stream of events for the specified user.Methods inherited from class org.gitlab4j.api.AbstractApi
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, upload, urlEncode, validate
-
Constructor Details
-
EventsApi
-
-
Method Details
-
getAuthenticatedUserEvents
public List<Event> getAuthenticatedUserEvents(Constants.ActionType action, Constants.TargetType targetType, Date before, 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, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- 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 List<Event> getAllAuthenticatedUserEvents(Constants.ActionType action, Constants.TargetType targetType, Date before, 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, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- 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 List<Event> getAuthenticatedUserEvents(Constants.ActionType action, Constants.TargetType targetType, Date before, 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, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- sort events in ASC or DESC order by created_at. Default is DESC, optionalpage
- the page to getperPage
- 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 List<Event> getAuthenticatedUserEvents(Constants.ActionType action, Constants.TargetType targetType, Date before, 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, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- sort events in ASC or DESC order by created_at. Default is DESC, optionalpage
- the page to getperPage
- the number of projects per pagescope
- 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, Date before, 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, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- sort events in ASC or DESC order by created_at. Default is DESC, optionalitemsPerPage
- 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, Date before, 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, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- sort events in ASC or DESC order by created_at. Default is DESC, optionalitemsPerPage
- the number of Event instances that will be fetched per pagescope
- 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 Stream<Event> getAuthenticatedUserEventsStream(Constants.ActionType action, Constants.TargetType targetType, Date before, 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, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- 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 Stream<Event> getAllAuthenticatedUserEventsStream(Constants.ActionType action, Constants.TargetType targetType, Date before, 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, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- 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 List<Event> getUserEvents(Object userIdOrUsername, Constants.ActionType action, Constants.TargetType targetType, Date before, 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 usernameaction
- include only events of a particular action type, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- 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 List<Event> getUserEvents(Object userIdOrUsername, Constants.ActionType action, Constants.TargetType targetType, Date before, 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 usernameaction
- include only events of a particular action type, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- sort events in ASC or DESC order by created_at. Default is DESC, optionalpage
- the page to getperPage
- 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(Object userIdOrUsername, Constants.ActionType action, Constants.TargetType targetType, Date before, 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 usernameaction
- include only events of a particular action type, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- sort events in ASC or DESC order by created_at. Default is DESC, optionalitemsPerPage
- 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 Stream<Event> getUserEventsStream(Object userIdOrUsername, Constants.ActionType action, Constants.TargetType targetType, Date before, 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 usernameaction
- include only events of a particular action type, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- 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 List<Event> getProjectEvents(Object projectIdOrPath, Constants.ActionType action, Constants.TargetType targetType, Date before, 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 instanceaction
- include only events of a particular action type, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- 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 List<Event> getProjectEvents(Object projectIdOrPath, Constants.ActionType action, Constants.TargetType targetType, Date before, 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 instanceaction
- include only events of a particular action type, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- sort events in ASC or DESC order by created_at. Default is DESC, optionalpage
- the page to getperPage
- 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(Object projectIdOrPath, Constants.ActionType action, Constants.TargetType targetType, Date before, 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 instanceaction
- include only events of a particular action type, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- sort events in ASC or DESC order by created_at. Default is DESC, optionalitemsPerPage
- 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 Stream<Event> getProjectEventsStream(Object projectIdOrPath, Constants.ActionType action, Constants.TargetType targetType, Date before, 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 instanceaction
- include only events of a particular action type, optionaltargetType
- include only events of a particular target type, optionalbefore
- include only events created before a particular date, optionalafter
- include only events created after a particular date, optionalsortOrder
- 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
-