Skip to contents

Polls checkPhotoscene at a fixed interval until processing reaches 100% or an error occurs.

Usage

waitForPhotoscene(
  photoscene_id,
  token,
  interval = 30,
  timeout = 1800,
  verbose = TRUE
)

Arguments

photoscene_id

A string. Photoscene ID returned by createPhotoscene.

token

A string or aps_token object.

interval

Seconds between polls. Defaults to 30.

timeout

Maximum seconds to wait before aborting. Defaults to 1800 (30 minutes).

verbose

If TRUE (default), prints a message after each poll.

Value

The final checkPhotoscene response object.

Examples

if (FALSE) { # \dontrun{
ps   <- createPhotoscene("my-scene", token = myToken)
id   <- ps$content$photoscene$photosceneid
imgs <- uploadImages(id, c("img1.jpg", "img2.jpg"), myToken)
proc <- processPhotoscene(id, myToken)
done <- waitForPhotoscene(id, myToken)
done$content$photoscene$progress
} # }