jan-wennrich / bgg-api
BoardGameGeek.com API Client Library
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 12
pkg:composer/jan-wennrich/bgg-api
Requires
- php: ^8.0
- ext-simplexml: *
- guzzlehttp/guzzle: ^7.10
- psr/log: ^1.1 || ^2.0 || ^3.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.48.2
- friendsofphp/php-cs-fixer: ^3.92.3
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: 2.1.33
- phpstan/phpstan-phpunit: ^2.0.11
- phpunit/phpunit: ^12.5.4
- rector/rector: ^2.3
- shipmonk/composer-dependency-analyser: ^1.8.4
This package is auto-updated.
Last update: 2025-12-31 00:23:02 UTC
README
PHP API Client Library for the BoardGameGeek.com API.
(Only the BGG XML API2 is currently supported)
Installation
composer require jan-wennrich/bgg-api
Usage
// initialize client $client = new \JanWennrich\BoardGameGeekApi\Client(); // download information about "Dixit" // https://boardgamegeek.com/boardgame/39856/dixit $thing = $client->getThing(39856, true); var_dump($thing->getName()); var_dump($thing->getYearPublished()); var_dump($thing->getBoardgameCategories()); var_dump($thing->getRatingAverage()); // ... // download information about user // https://boardgamegeek.com/user/Nataniel $user = $client->getUser('nataniel'); var_dump($user->getAvatar()); var_dump($user->getCountry()); // search for a game $results = $client->search('Domek'); echo count($results); $things = []; foreach ($result as $item) { var_dump($item->getName()); $things[] = $client->getThing($item->getId()); }
Credits
This is a fork of castro732/bggxmlapi2 which is a fork of nataniel/bggxmlapi2.