tw_get_cache_table_name: Gets name of table inside the database

View source: R/tw_get_cached_item.R

tw_get_cache_table_nameR Documentation

Gets name of table inside the database

Description

Gets name of table inside the database

Usage

tw_get_cache_table_name(
  type = "item",
  language = tidywikidatar::tw_get_language(),
  response_language = tidywikidatar::tw_get_language()
)

Arguments

type

Defaults to "item". Type of cache file to output. Values typically used by tidywikidatar include "item", "search_item", "search_property", and "qualifier".

language

Defaults to language set with tw_set_language(); "en" if not set. Used to limit the data to be cached. Use "all_available" to keep all data. For available values, see https://www.wikidata.org/wiki/Help:Wikimedia_language_codes/lists/all

response_language

Defaults to language set with tw_set_language(); "en" if not set. Relevant only when type is set to "search_item" or "search_property". See tw_search() for details.

Value

A character vector of length one with the name of the relevant table in the cache file.

Examples

# outputs name of table used in the cache database
tw_get_cache_table_name(type = "item", language = "en")

giocomai/tidywikidatar documentation built on Aug. 2, 2024, 5:33 p.m.