View source: R/get_export_status.R
get_export_status | R Documentation |
A function to check the status of an export
request. This is a housekeeping function
used in many of the other godataR
functions.
get_export_status(url, username, password, request_id)
url |
Insert the base URL for your instance of Go.Data here. Don't forget the forward slash "/" at end! |
username |
The email address for your Go.Data login. |
password |
The password for your Go.Data login |
request_id |
The id number for the export request. |
Returns the current status of the export request.
## Not run:
url <- "https://MyGoDataServer.com/"
username <- "myemail@email.com"
password <- "mypassword"
outbreak_id <- "3b5554d7-2c19-41d0-b9af-475ad25a382b"
access_token <- get_access_token(
url = url,
username = username,
password = password
)
# Submit an export request
export_request <- GET(
paste0(
url,
"api/outbreaks/",
outbreak_id,
"/cases/export",
"&access_token=",
access_token
)
)
request_id <- content(export_request)
request_id <- pluck(request_id, "exportLogId")
# Check the status of the export request
export_request_status <- get_export_status(
url = url,
username = username,
password = password,
request_id = request_id
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.