R/http.R

Defines functions wdqs_requester

#' @import ratelimitr
wdqs_requester <- function() {
  req <- function(query, ...) {
    httr::POST(
      url = "https://query.wikidata.org/sparql",
      query = list(query = query),
      httr::user_agent("https://github.com/bearloga/WikidataQueryServiceR"),
      ...
    )
  }
  return(limit_rate(req, rate(n = 30, period = 60)))
}

Try the WikidataQueryServiceR package in your browser

Any scripts or data that you put into this service are public.

WikidataQueryServiceR documentation built on July 2, 2020, 2:12 a.m.