When I try quite simple queries with atlas_media, they often fail. For example, to get images for this record, I get:
atlas_media(
filter = galah_filter(id == "ead2f896-4c07-4e5e-9dc4-be5c9ee7643f"),
download_dir = "cache")
|========================================================================| 100%
Calling the API failed for `atlas_media`.
ℹ This might mean that the ALA system is down. Double check that your query is correct.
ℹ If you continue to see this message, please email support@ala.org.au.
# A tibble: 0 × 0
On further investigation, it appears there are (at least) two problems:
This function uses the imageInfoForList API (docs here) to query many image identifiers at once, but doesn't appear to work
It also uses curl::Async to make the query, but this errors for unknown reasons (Error in AsyncVaried$new(.list = reqs) : object 'reqs' not found)
Both problems can be solved by choosing simpler solutions and looping/lapply-ing across all identifiers. This approach has the advantage that the API supports downloading thumbnails by adding thumbnail to the url, perhaps via a type argument.
When I try quite simple queries with
atlas_media
, they often fail. For example, to get images for this record, I get:On further investigation, it appears there are (at least) two problems:
imageInfoForList
API (docs here) to query many image identifiers at once, but doesn't appear to workcurl::Async
to make the query, but this errors for unknown reasons (Error in AsyncVaried$new(.list = reqs) : object 'reqs' not found
)Both problems can be solved by choosing simpler solutions and looping/
lapply
-ing across all identifiers. This approach has the advantage that the API supports downloading thumbnails by addingthumbnail
to the url, perhaps via atype
argument.