janiv / shelf
BoardGameGeek API 2.0 Wrapper for PHP
v0.2.0
2014-02-17 03:46 UTC
Requires
- php: >=5.3.3
- guzzle/guzzle: ~3.7
Requires (Dev)
- phpunit/php-invoker: ~1.1.0
- phpunit/phpunit: 3.7.*
- squizlabs/php_codesniffer: ~1.5
This package is not auto-updated.
Last update: 2024-11-18 16:17:13 UTC
README
A PHP Library to work with the Board Game Geek XML API2 through Guzzle and Entities
Example
<?php include 'vendor/autoload.php'; $client = Shelf\Client::factory(); // Getting a single game $response = $client->getBoardgame( array('id' => 13) ); $game = $response->getBoardgame(); echo '<p>' . $game->getPrimaryName()->getValue() . '</p>'; // Getting a collection of games $response = $client->getBoardgames( array('id' => array(12, 13, 34119)) ); $games = $response->getBoardgames(); foreach ($games as $game) { echo '<p>' . $game->getPrimaryName()->getValue() . '</p>'; }