Package org.gitlab4j.api
Class TodosApi
java.lang.Object
org.gitlab4j.api.AbstractApi
org.gitlab4j.api.TodosApi
- All Implemented Interfaces:
Constants
This class implements the client side API for the GitLab Todos API.
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a List of done todos for the current user.getDoneTodos
(int itemsPerPage) Get a Pager of done todos for the current user.Get a Stream of done todos for the current user.Get a List of pending todos for the current user.getPendingTodos
(int itemsPerPage) Get a Pager of pending todos for the current user.Get a Stream of pending todos for the current user.getTodos
(Constants.TodoAction action, Long authorId, Long projectId, Long groupId, Constants.TodoState state, Constants.TodoType type) Get a List of all todos that match the provided filter params.getTodos
(Constants.TodoAction action, Long authorId, Long projectId, Long groupId, Constants.TodoState state, Constants.TodoType type, int itemsPerPage) Returns a Pager of todos that match the provided filter params.getTodosStream
(Constants.TodoAction action, Long authorId, Long projectId, Long groupId, Constants.TodoState state, Constants.TodoType type) Get a List of all todos that match the provided filter params.void
Marks all pending todos for the current user as done.markAsDone
(Long todoId) Marks a single pending todo given by its ID for the current user as done.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
-
TodosApi
-
-
Method Details
-
getPendingTodos
Get a List of pending todos for the current user.GitLab Endpoint: GET /todos
- Returns:
- a List of pending Todos for the current user
- Throws:
GitLabApiException
- if any exception occurs
-
getPendingTodos
Get a Pager of pending todos for the current user.GitLab Endpoint: GET /todos
- Parameters:
itemsPerPage
- the number of todo that will be fetched per page- Returns:
- a Pager containing the pending Todos for the current user
- Throws:
GitLabApiException
- if any exception occurs
-
getPendingTodosStream
Get a Stream of pending todos for the current user.GitLab Endpoint: GET /todos
- Returns:
- a Stream containing the pending Todos for the user
- Throws:
GitLabApiException
- if any exception occurs
-
getDoneTodos
Get a List of done todos for the current user.GitLab Endpoint: GET /todos
- Returns:
- a List of done Todos for the current user
- Throws:
GitLabApiException
- if any exception occurs
-
getDoneTodos
Get a Pager of done todos for the current user.GitLab Endpoint: GET /todos
- Parameters:
itemsPerPage
- the number of todo that will be fetched per page- Returns:
- a Pager containing the done Todos for the current user
- Throws:
GitLabApiException
- if any exception occurs
-
getDoneTodosStream
Get a Stream of done todos for the current user.GitLab Endpoint: GET /todos
- Returns:
- a Stream containing the done Todos for the current user
- Throws:
GitLabApiException
- if any exception occurs
-
getTodos
public List<Todo> getTodos(Constants.TodoAction action, Long authorId, Long projectId, Long groupId, Constants.TodoState state, Constants.TodoType type) throws GitLabApiException Get a List of all todos that match the provided filter params.GitLab Endpoint: GET /todos
- Parameters:
action
- the action to be filtered. Can be assigned, mentioned, build_failed, marked, approval_required, unmergeable or directly_addressed.authorId
- the ID of an authorprojectId
- the ID of a projectgroupId
- the ID of a groupstate
- the state of the todo. Can be either pending or donetype
- the type of a todo. Can be either Issue or MergeRequest- Returns:
- Stream of Todo instances
- Throws:
GitLabApiException
- if any exception occurs
-
getTodosStream
public Stream<Todo> getTodosStream(Constants.TodoAction action, Long authorId, Long projectId, Long groupId, Constants.TodoState state, Constants.TodoType type) throws GitLabApiException Get a List of all todos that match the provided filter params.GitLab Endpoint: GET /todos
- Parameters:
action
- the action to be filtered. Can be assigned, mentioned, build_failed, marked, approval_required, unmergeable or directly_addressed.authorId
- the ID of an authorprojectId
- the ID of a projectgroupId
- the ID of a groupstate
- the state of the todo. Can be either pending or donetype
- the type of a todo. Can be either Issue or MergeRequest- Returns:
- Stream of Todo instances
- Throws:
GitLabApiException
- if any exception occurs
-
getTodos
public Pager<Todo> getTodos(Constants.TodoAction action, Long authorId, Long projectId, Long groupId, Constants.TodoState state, Constants.TodoType type, int itemsPerPage) throws GitLabApiException Returns a Pager of todos that match the provided filter params. When no filter params are provided, will returns all pending todos for the current user.GitLab Endpoint: GET /todos
- Parameters:
action
- the action to be filtered. Can be assigned, mentioned, build_failed, marked, approval_required, unmergeable or directly_addressed.authorId
- the ID of an authorprojectId
- the ID of a projectgroupId
- the ID of a groupstate
- the state of the todo. Can be either pending or donetype
- the type of a todo. Can be either Issue or MergeRequestitemsPerPage
- the number of todo that will be fetched per page- Returns:
- a list of pages in todo for the specified range
- Throws:
GitLabApiException
- if any exception occurs
-
markAsDone
Marks a single pending todo given by its ID for the current user as done. The todo marked as done is returned in the response.GitLab Endpoint: POST /todos/:id/mark_as_done
- Parameters:
todoId
- the ID of a todo- Returns:
- todo instance with info on the created page
- Throws:
GitLabApiException
- if any exception occurs
-
markAllAsDone
Marks all pending todos for the current user as done.GitLab Endpoint: POST /todos/mark_as_done
- Throws:
GitLabApiException
- if any exception occurs
-