Commit eace5a40 authored by Greg Messner's avatar Greg Messner
Browse files

Fixed spelling of cancelJob() (#561)

parent 8f3f40e2
...@@ -437,8 +437,24 @@ public class JobApi extends AbstractApi implements Constants { ...@@ -437,8 +437,24 @@ public class JobApi extends AbstractApi implements Constants {
* @param jobId the ID to cancel job * @param jobId the ID to cancel job
* @return job instance which just canceled * @return job instance which just canceled
* @throws GitLabApiException if any exception occurs during execution * @throws GitLabApiException if any exception occurs during execution
* @deprecated replaced by {@link #cancelJob(Object, Integer)}
*/ */
@Deprecated
public Job cancleJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException { public Job cancleJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
return (cancelJob(projectIdOrPath, jobId));
}
/**
* Cancel specified job in a project.
*
* <pre><code>GitLab Endpoint: POST /projects/:id/jobs/:job_id/cancel</code></pre>
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param jobId the ID to cancel job
* @return job instance which just canceled
* @throws GitLabApiException if any exception occurs during execution
*/
public Job cancelJob(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
GitLabApiForm formData = null; GitLabApiForm formData = null;
Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "cancel"); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "cancel");
return (response.readEntity(Job.class)); return (response.readEntity(Job.class));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment