Package org.gitlab4j.api
Class EventsApi
- java.lang.Object
-
- org.gitlab4j.api.AbstractApi
-
- org.gitlab4j.api.EventsApi
-
- All Implemented Interfaces:
Constants
public class EventsApi extends AbstractApi
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.CommitBuildState, Constants.Encoding, Constants.EpicOrderBy, Constants.GroupOrderBy, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestState, Constants.MilestoneState, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.SortOrder, Constants.StateEvent, Constants.TargetType, Constants.TokenType
-
-
Field Summary
-
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
-
-
Method Summary
Modifier and Type Method Description List<Event>
getAuthenticatedUserEvents(Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder)
Get a list of events for the authenticated user.Pager<Event>
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.List<Event>
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.Stream<Event>
getAuthenticatedUserEventsStream(Constants.ActionType action, Constants.TargetType targetType, Date before, Date after, Constants.SortOrder sortOrder)
Get a Stream of events for the authenticated user.List<Event>
getProjectEvents(Integer 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.List<Event>
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.Pager<Event>
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.Stream<Event>
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.List<Event>
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.Pager<Event>
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.List<Event>
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.Stream<Event>
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, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, urlEncode, validate
-
-
-
-
Constructor Detail
-
EventsApi
public EventsApi(GitLabApi gitLabApi)
-
-
Method Detail
-
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
-
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 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
-
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
-
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 Integer(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(Integer 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 Integer(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 Integer(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 Integer(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
-
-