Constants
public class WikisApi extends AbstractApi
Constants.ActionType, Constants.EpicOrderBy, Constants.GroupOrderBy, Constants.ImpersonationState, 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
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
Modifier and Type | Method | Description |
---|---|---|
WikiPage |
createPage(Integer projectId,
String title,
String content) |
Creates a new project wiki page.
|
void |
deletePage(Integer projectId,
String slug) |
Deletes an existing project wiki page.
|
Optional<WikiPage> |
getOptionalPage(Integer projectId,
String slug) |
Get a single page of project wiki as an Optional instance.
|
WikiPage |
getPage(Integer projectId,
String slug) |
Get a single page of project wiki.
|
List<WikiPage> |
getPages(Integer projectId) |
Get a list of pages in project wiki.
|
Pager<WikiPage> |
getPages(Integer projectId,
int itemsPerPage) |
Get a Pager of project's wiki pages.
|
List<WikiPage> |
getPages(Integer projectId,
int page,
int perPage) |
Get a list of project snippets.
|
WikiPage |
updatePage(Integer projectId,
String slug,
String title,
String content) |
Updates an existing project wiki page.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getGroupIdOrPath, getPageQueryParams, getProjectIdOrPath, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, putWithFormData, upload, upload, urlEncode, validate
public WikisApi(GitLabApi gitLabApi)
public List<WikiPage> getPages(Integer projectId) throws GitLabApiException
projectId
- the project ID to get the wiki-pages forGitLabApiException
- if any exception occurspublic List<WikiPage> getPages(Integer projectId, int page, int perPage) throws GitLabApiException
projectId
- the project ID to get the wiki pages forpage
- the page to getperPage
- the number of wiki-pages per pageGitLabApiException
- if any exception occurspublic Pager<WikiPage> getPages(Integer projectId, int itemsPerPage) throws GitLabApiException
projectId
- the project ID to get the wiki-pages foritemsPerPage
- the number of wiki-pages per pageGitLabApiException
- if any exception occurspublic WikiPage getPage(Integer projectId, String slug) throws GitLabApiException
projectId
- the project ID to get the wiki page forslug
- the slug of the project's wiki pageGitLabApiException
- if any exception occurspublic Optional<WikiPage> getOptionalPage(Integer projectId, String slug)
projectId
- the project ID to get the snippet forslug
- the slug of the project's wiki pagepublic WikiPage createPage(Integer projectId, String title, String content) throws GitLabApiException
projectId
- the ID of the project owned by the authenticated user, requiredtitle
- the title of a snippet, requiredcontent
- the content of a wiki page, requiredGitLabApiException
- if any exception occurspublic WikiPage updatePage(Integer projectId, String slug, String title, String content) throws GitLabApiException
projectId
- the ID of the project owned by the authenticated user, requiredslug
- the slug of the project's wiki page, requiredtitle
- the title of a snippet, optionalcontent
- the content of a page, optional. Either title or content must be supplied.GitLabApiException
- if any exception occurspublic void deletePage(Integer projectId, String slug) throws GitLabApiException
projectId
- the project IDslug
- the slug of the project's wiki pageGitLabApiException
- if any exception occursCopyright © 2018. All rights reserved.