addwiki/wikibase-query

Wikibase Query library

3.1.0 2024-07-12 17:24 UTC

This package is auto-updated.

Last update: 2024-10-15 20:50:59 UTC


README

GitHub issue custom search in repo Latest Stable Version Download count

Issue tracker: https://github.com/addwiki/addwiki/issues

Installation

Use composer to install the library and all its dependencies:

composer require "addwiki/wikibase-query:~3.0"

Examples

Use the SimpleQueryService with wikidata.

use Addwiki\Wikibase\Query\WikibaseQueryFactory;
use Addwiki\Wikibase\Query\PrefixSets;

$factory = new WikibaseQueryFactory(
    "https://query.wikidata.org/sparql",
    PrefixSets::WIKIDATA
);

$r = $factory->newSimpleQueryService()->query(["P31:Q1"]);