diff options
Diffstat (limited to 'model/client4.go')
-rw-r--r-- | model/client4.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/model/client4.go b/model/client4.go index da3dfacb7..996d9362c 100644 --- a/model/client4.go +++ b/model/client4.go @@ -2790,22 +2790,22 @@ func (c *Client4) OpenGraph(url string) (map[string]string, *Response) { // Jobs Section -// GetJobStatus gets the status of a single job. -func (c *Client4) GetJobStatus(id string) (*JobStatus, *Response) { +// GetJob gets a single job. +func (c *Client4) GetJob(id string) (*Job, *Response) { if r, err := c.DoApiGet(c.GetJobsRoute()+fmt.Sprintf("/%v/status", id), ""); err != nil { return nil, BuildErrorResponse(r, err) } else { defer closeBody(r) - return JobStatusFromJson(r.Body), BuildResponse(r) + return JobFromJson(r.Body), BuildResponse(r) } } -// GetJobStatusesByType gets the status of all jobs of a given type, sorted with the job that most recently started first. -func (c *Client4) GetJobStatusesByType(jobType string, page int, perPage int) ([]*JobStatus, *Response) { +// GetJobsByType gets all jobs of a given type, sorted with the job that most recently started first. +func (c *Client4) GetJobsByType(jobType string, page int, perPage int) ([]*Job, *Response) { if r, err := c.DoApiGet(c.GetJobsRoute()+fmt.Sprintf("/type/%v/statuses?page=%v&per_page=%v", jobType, page, perPage), ""); err != nil { return nil, BuildErrorResponse(r, err) } else { defer closeBody(r) - return JobStatusesFromJson(r.Body), BuildResponse(r) + return JobsFromJson(r.Body), BuildResponse(r) } } |