spq_init | R Documentation |
Initialize a query object.
spq_init(
endpoint = "wikidata",
request_control = spq_control_request(user_agent = getOption("glitter.ua",
"glitter R package (https://github.com/lvaudor/glitter)"), max_tries =
getOption("glitter.max_tries", 3L), max_seconds = getOption("glitter.max_seconds",
120L), timeout = getOption("glitter.timeout", 1000L), request_type = c("url",
"body-form")),
endpoint_info = spq_endpoint_info(label_property = "rdfs:label")
)
endpoint |
Endpoint, either name if it is in |
request_control |
An object as returned by |
endpoint_info |
Do not use for an usual endpoint in |
A query object
SPARQL queries are shown using the cli package,
with a built-in theme.
You can change it by using the cli.user_theme
option.
We use
.emph
for keywords and functions,
.field
for variables,
.pkg
for prefixes,
.val
for strings,
.url
for prefix URLs.
You can also turn off the cli behavior by setting the environment variable
"GLITTER.NOCLI"
to any non-empty string.
That's what we do in glitter snapshot tests.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.