addwiki / wikibase-query
Wikibase Query library
3.1.0
2024-07-12 17:24 UTC
Requires
- php: >=8.1
- benestar/asparagus: ~0.4
- guzzlehttp/guzzle: ~6.3||~7.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-12-15 21:12:58 UTC
README
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"]);