Downloads the data for jobs that have an associated file, such as a query's results. Called on Jobs that are the results of a project forecast or truth queries via submit_query(). NB: It is a 404 Not Found error if this is called on a Job that has no underlying S3 data file, which can happen b/c: 1) 24 hours has passed (the expiration time) or 2) the Job is not complete and therefore has not saved the data file. For the latter you may use busy_poll_job() to ensure the job is done.

job_data(zoltar_connection, job_url, query_type)

Arguments

zoltar_connection

A ZoltarConnection object as returned by new_connection()

job_url

URL of a valid job in zoltar_connection that has a data file associated with it

query_type

A character indicating the type of query to run. Must be one of: "forecasts" or "truth".

Examples

if (FALSE) {
  the_job_data <- job_data(conn, "http://example.com/api/job/2/")
}