func (c *Client) KillJob(jobID int) error {
	req, err := c.caller.R().Delete(c.getEndpoint("jobs", fmt.Sprintf("/%v", jobID), url.Values{}))
	if err != nil {
		return fmt.Errorf("Error while killing job: '%s'", err)
	}
	if req.StatusCode() != 202 && req.StatusCode() != 400 {
		return fmt.Errorf("The server returned an error (code: %d) after job killing request: '%s'", req.StatusCode(), req.Status())
	}
	return nil
}
KillJob ask for deletion of a job
package api
import (
	"fmt"
	"net/url"
)
type JobRequest struct {
	Resources   string   `json:"resources"`
	Command     string   `json:"command"`
	Properties  string   `json:"properties,omitempty"`
	Reservation string   `json:"reservation,omitempty"`
	Types       []string `json:"types"`
	Queue       string   `json:"queue"`
}
type Job struct {
	UID       int      `json:"uid"`
	State     string   `json:"state"`
	Timelife  int      `json:"walltime"`
	Types     []string `json:"types"`
	StartTime int      `json:"started_at"`
	Nodes     []string `json:"assigned_nodes"`
}
func (c *Client) SubmitJob(jobReq JobRequest) (int, error) {
	req, err := c.caller.R().
		SetHeader("Content-Type", "application/json").
		SetBody(jobReq).
		SetResult(&Job{}).
		Post(c.getEndpoint("jobs", "/", url.Values{}))
	if err != nil {
		return 0, fmt.Errorf("Error while sending Job submission: '%s'", err)
	}
	if req.StatusCode() != 201 {
		return 0, fmt.Errorf("The server returned an error (code: %d) after sending Job submission: '%s'", req.StatusCode(), req.Status())
	}
	job, ok := req.Result().(*Job)
	if !ok {
		return 0, fmt.Errorf("Error in the response of the Job submission (unexpected type)")
	}
	return job.UID, nil
}
func (c *Client) GetJob(jobID int) (*Job, error) {
	req, err := c.caller.R().
		SetResult(&Job{}).
		Get(c.getEndpoint("jobs", fmt.Sprintf("/%v", jobID), url.Values{}))
	if err != nil {
		return nil, fmt.Errorf("Error while retrieving Job informations")
	}
	if req.StatusCode() != 200 {
		return nil, fmt.Errorf("The server returned an error (code: %d) after requesting Job informations: '%s'", req.StatusCode(), req.Status())
	}
	job, ok := req.Result().(*Job)
	if !ok {
		return nil, fmt.Errorf("Error in the Job retrieving (unexpected type)")
	}
	return job, nil
}