GetJob returns a job for the provided GUID.
(jobURL JobURL)
| 77 | |
| 78 | // GetJob returns a job for the provided GUID. |
| 79 | func (client *Client) GetJob(jobURL JobURL) (Job, Warnings, error) { |
| 80 | var responseBody Job |
| 81 | |
| 82 | _, warnings, err := client.MakeRequest(RequestParams{ |
| 83 | URL: string(jobURL), |
| 84 | ResponseBody: &responseBody, |
| 85 | }) |
| 86 | |
| 87 | for _, jobWarning := range responseBody.Warnings { |
| 88 | warnings = append(warnings, jobWarning.Detail) |
| 89 | } |
| 90 | |
| 91 | return responseBody, warnings, err |
| 92 | } |
| 93 | |
| 94 | // PollJob will keep polling the given job until the job has terminated, an |
| 95 | // error is encountered, or config.OverallPollingTimeout is reached. In the |
no test coverage detected