View source: R/tw_get_cached_search.R
| tw_get_cached_search | R Documentation |
Retrieve cached search
tw_get_cached_search(
search,
type = "item",
language = tidywikidatar::tw_get_language(),
response_language = tidywikidatar::tw_get_language(),
cache = NULL,
include_search = FALSE,
cache_connection = NULL,
disconnect_db = TRUE
)
search |
A string to be searched in Wikidata |
type |
Defaults to "item". Either "item" or "property". |
language |
Language to be used for the search. Can be set once per
session with |
response_language |
Language to be used for the returned labels and
descriptions. Corresponds to the |
cache |
Defaults to |
include_search |
Logical, defaults to |
cache_connection |
Defaults to |
disconnect_db |
Defaults to |
If data present in cache, returns a data frame with cached data.
tw_set_cache_folder(path = tempdir())
tw_enable_cache()
tw_create_cache_folder(ask = FALSE)
search_from_api <- tw_search("Sylvia Pankhurst")
search_from_api
df_from_cache <- tw_get_cached_search("Sylvia Pankhurst")
df_from_cache
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.