reqWDQS {wikiTools} | R Documentation |
Get responses from Wikidata Query Service
Description
Retrieve responses from Wikidata Query Service (WDQS)
Usage
reqWDQS(sparql_query, format = "json", method = "GET")
Arguments
sparql_query |
A string with the query in SPARQL language (SELECT query). |
format |
A string with the query response format, mandatory. See https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual#SPARQL_endpoint. Only 'json', 'xml' or 'csv' formats are allowed, default 'json'. |
method |
The method used in the httr request, GET or POST, mandatory. Default 'GET'. Use 'POST' method for long SELECT clauses. |
Value
The response in the format selected. Please check httr::stop_for_status(response)
Note
For short queries GET method is better, POST for long ones. Only GET queries as cached.
Author(s)
Angel Zazo, Department of Computer Science and Automatics, University of Salamanca
[Package wikiTools version 1.2.7 Index]