Constants
public class SystemHooksApi extends AbstractApi
Constants.ActionType, Constants.GroupOrderBy, Constants.ImpersonationState, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, 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
Constructor | Description |
---|---|
SystemHooksApi(GitLabApi gitLabApi) |
Modifier and Type | Method | Description |
---|---|---|
SystemHook |
addSystemHook(String url,
String token,
Boolean pushEvents,
Boolean tagPushEvents,
Boolean enablSsslVerification) |
Add a new system hook.
|
void |
deleteSystemHook(Integer hookId) |
Deletes a system hook.
|
void |
deleteSystemHook(SystemHook hook) |
Deletes a system hook.
|
List<SystemHook> |
getSystemHooks() |
Get a list of all system hooks.
|
Pager<SystemHook> |
getSystemHooks(int itemsPerPage) |
Get a Pager of all system hooks.
|
List<SystemHook> |
getSystemHooks(int page,
int perPage) |
Get a list of all system hooks using the specified page and per page settings.
|
void |
testSystemHook(Integer hookId) |
Test a system hook.
|
void |
testSystemHook(SystemHook hook) |
Test a system hook.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getPageQueryParams, getWithAccepts, handle, isApiVersion, post, post, post, post, put, put, putWithFormData, urlEncode, validate
public SystemHooksApi(GitLabApi gitLabApi)
public List<SystemHook> getSystemHooks() throws GitLabApiException
GET /hooks
GitLabApiException
- if any exception occurspublic List<SystemHook> getSystemHooks(int page, int perPage) throws GitLabApiException
GET /hooks
page
- the page to getperPage
- the number of deploy keys per pageGitLabApiException
- if any exception occurspublic Pager<SystemHook> getSystemHooks(int itemsPerPage) throws GitLabApiException
GET /hooks
itemsPerPage
- the number of SystemHookEvent instances that will be fetched per pageGitLabApiException
- if any exception occurspublic SystemHook addSystemHook(String url, String token, Boolean pushEvents, Boolean tagPushEvents, Boolean enablSsslVerification) throws GitLabApiException
POST /hooks
url
- the hook URL, requiredtoken
- secret token to validate received payloads, optionalpushEvents
- when true, the hook will fire on push events, optionaltagPushEvents
- when true, the hook will fire on new tags being pushed, optionalenablSsslVerification
- do SSL verification when triggering the hook, optionalGitLabApiException
- if any exception occurspublic void deleteSystemHook(SystemHook hook) throws GitLabApiException
DELETE /hooks/:hook_id
hook
- the SystemHook instance to deleteGitLabApiException
- if any exception occurspublic void deleteSystemHook(Integer hookId) throws GitLabApiException
DELETE /hooks/:hook_id
hookId
- the ID of the system hook to deleteGitLabApiException
- if any exception occurspublic void testSystemHook(SystemHook hook) throws GitLabApiException
GET /hooks/:hook_id
hook
- the SystemHookEvent instance to testGitLabApiException
- if any exception occurspublic void testSystemHook(Integer hookId) throws GitLabApiException
GET /hooks/:hook_id
hookId
- the ID of the system hook to testGitLabApiException
- if any exception occursCopyright © 2018. All rights reserved.