public class TodosApi extends AbstractApi
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.ContributorOrderBy, Constants.DefaultBranchProtectionLevel, 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.ProjectAccessTokenScope, Constants.ProjectCreationLevel, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, Constants.StateEvent, Constants.SubgroupCreationLevel, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
gitLabApi
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
Modifier and Type | Method and Description |
---|---|
java.util.List<Todo> |
getDoneTodos()
Get a List of done todos for the current user.
|
Pager<Todo> |
getDoneTodos(int itemsPerPage)
Get a Pager of done todos for the current user.
|
java.util.stream.Stream<Todo> |
getDoneTodosStream()
Get a Stream of done todos for the current user.
|
java.util.List<Todo> |
getPendingTodos()
Get a List of pending todos for the current user.
|
Pager<Todo> |
getPendingTodos(int itemsPerPage)
Get a Pager of pending todos for the current user.
|
java.util.stream.Stream<Todo> |
getPendingTodosStream()
Get a Stream of pending todos for the current user.
|
java.util.List<Todo> |
getTodos(Constants.TodoAction action,
java.lang.Long authorId,
java.lang.Long projectId,
java.lang.Long groupId,
Constants.TodoState state,
Constants.TodoType type)
Get a List of all todos that match the provided filter params.
|
Pager<Todo> |
getTodos(Constants.TodoAction action,
java.lang.Long authorId,
java.lang.Long projectId,
java.lang.Long groupId,
Constants.TodoState state,
Constants.TodoType type,
int itemsPerPage)
Returns a Pager of todos that match the provided filter params.
|
java.util.stream.Stream<Todo> |
getTodosStream(Constants.TodoAction action,
java.lang.Long authorId,
java.lang.Long projectId,
java.lang.Long groupId,
Constants.TodoState state,
Constants.TodoType type)
Get a List of all todos that match the provided filter params.
|
void |
markAllAsDone()
Marks all pending todos for the current user as done.
|
Todo |
markAsDone(java.lang.Long todoId)
Marks a single pending todo given by its ID for the current user as done.
|
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
public TodosApi(GitLabApi gitLabApi)
public java.util.List<Todo> getPendingTodos() throws GitLabApiException
GitLab Endpoint: GET /todos
GitLabApiException
- if any exception occurspublic Pager<Todo> getPendingTodos(int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /todos
itemsPerPage
- the number of todo that will be fetched per pageGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Todo> getPendingTodosStream() throws GitLabApiException
GitLab Endpoint: GET /todos
GitLabApiException
- if any exception occurspublic java.util.List<Todo> getDoneTodos() throws GitLabApiException
GitLab Endpoint: GET /todos
GitLabApiException
- if any exception occurspublic Pager<Todo> getDoneTodos(int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /todos
itemsPerPage
- the number of todo that will be fetched per pageGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Todo> getDoneTodosStream() throws GitLabApiException
GitLab Endpoint: GET /todos
GitLabApiException
- if any exception occurspublic java.util.List<Todo> getTodos(Constants.TodoAction action, java.lang.Long authorId, java.lang.Long projectId, java.lang.Long groupId, Constants.TodoState state, Constants.TodoType type) throws GitLabApiException
GitLab Endpoint: GET /todos
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 MergeRequestGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Todo> getTodosStream(Constants.TodoAction action, java.lang.Long authorId, java.lang.Long projectId, java.lang.Long groupId, Constants.TodoState state, Constants.TodoType type) throws GitLabApiException
GitLab Endpoint: GET /todos
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 MergeRequestGitLabApiException
- if any exception occurspublic Pager<Todo> getTodos(Constants.TodoAction action, java.lang.Long authorId, java.lang.Long projectId, java.lang.Long groupId, Constants.TodoState state, Constants.TodoType type, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /todos
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 pageGitLabApiException
- if any exception occurspublic Todo markAsDone(java.lang.Long todoId) throws GitLabApiException
GitLab Endpoint: POST /todos/:id/mark_as_done
todoId
- the ID of a todoGitLabApiException
- if any exception occurspublic void markAllAsDone() throws GitLabApiException
GitLab Endpoint: POST /todos/mark_as_done
GitLabApiException
- if any exception occurs