| tw_get_image_metadata_single | R Documentation |
Please consult the relevant documentation for reusing content outside Wikimedia.
tw_get_image_metadata_single(
id,
image_filename = NULL,
only_first = TRUE,
language = tidywikidatar::tw_get_language(),
id_df = NULL,
cache = NULL,
overwrite_cache = FALSE,
read_cache = TRUE,
cache_connection = NULL,
disconnect_db = TRUE,
wait = 1,
attempts = 10
)
id |
A character vector of length 1, must start with Q, e.g. "Q254" for Wolfgang Amadeus Mozart. |
image_filename |
Defaults to |
only_first |
Defaults to |
language |
Defaults to language set with |
id_df |
Default to NULL. If given, it should be a dataframe typically
generated with |
cache |
Defaults to |
overwrite_cache |
Logical, defaults to |
read_cache |
Logical, defaults to TRUE. Mostly used internally to prevent checking if an item is in cache if it is already known that it is not in cache. |
cache_connection |
Defaults to |
disconnect_db |
Defaults to |
wait |
In seconds, defaults to 0. Time to wait between queries to Wikidata. If data are cached locally, wait time is not applied. If you are running many queries systematically you may want to add some waiting time between queries. |
attempts |
Defaults to 10. Number of times it re-attempts to reach the API before failing. |
A character vector, corresponding to reference to the image in the requested format.
if (interactive()) {
tw_get_image_metadata_single("Q180099")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.