powered by
Polls PubChem listkey endpoints until results are ready or the attempt limit is reached.
pc_poll( x, domain = "compound", operation = NULL, output = "JSON", options = NULL, interval = 1.5, max_attempts = 20, ... )
A `PubChemResult` object.
A `PubChemAsyncQuery` object or listkey string.
Domain for polling.
Operation for polling.
Output format.
Polling options.
Poll interval in seconds.
Maximum polling attempts.
Additional arguments passed to `pc_request`.
Polling stops early once `pending = FALSE`. On timeout, a structured `PubChemResult` failure with code `PollingTimeout` is returned.
polled <- pc_poll("example-listkey", max_attempts = 1, offline = TRUE) polled$success
Run the code above in your browser using DataLab