public class TodosApi extends AbstractApi
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.CommitBuildState, Constants.Encoding, Constants.EpicOrderBy, 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.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.StateEvent, 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 |
---|---|
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.
|
Stream<Todo> |
getDoneTodosStream()
Get a Stream of done todos for the current user.
|
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.
|
Stream<Todo> |
getPendingTodosStream()
Get a Stream of pending todos for the current user.
|
List<Todo> |
getTodos(Constants.TodoAction action,
Integer authorId,
Integer projectId,
Integer 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,
Integer authorId,
Integer projectId,
Integer groupId,
Constants.TodoState state,
Constants.TodoType type,
int itemsPerPage)
Returns a Pager of todos that match the provided filter params.
|
Stream<Todo> |
getTodosStream(Constants.TodoAction action,
Integer authorId,
Integer projectId,
Integer 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(Integer 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, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, urlEncode, validate
public TodosApi(GitLabApi gitLabApi)
public 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 Stream<Todo> getPendingTodosStream() throws GitLabApiException
GitLab Endpoint: GET /todos
GitLabApiException
- if any exception occurspublic 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 Stream<Todo> getDoneTodosStream() throws GitLabApiException
GitLab Endpoint: GET /todos
GitLabApiException
- if any exception occurspublic List<Todo> getTodos(Constants.TodoAction action, Integer authorId, Integer projectId, Integer 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 Stream<Todo> getTodosStream(Constants.TodoAction action, Integer authorId, Integer projectId, Integer 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, Integer authorId, Integer projectId, Integer 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(Integer 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 occursCopyright © 2019. All rights reserved.