dborsatto/giantbomb-bundle

该软件包已被废弃,不再维护。未建议替代软件包。

基于 dborsatto/php-giantbomb 软件包构建的 Symfony 扩展包。

v1.0.0 2017-02-04 18:53 UTC

This package is auto-updated.

Last update: 2024-05-21 07:24:05 UTC


README

这是一个基于 dborsatto/php-giantbomb 软件包构建的 Symfony 扩展包。

安装

使用 composer 安装

composer require dborsatto/giantbomb-bundle

配置

首先,在您的 AppKernel 中注册此扩展包

// ...
new DBorsatto\GiantBombBundle\GiantBombBundle(),
// ...

然后,您只需要在 config.yml 中添加一个 api_key。

giantbomb:
    api_key: YOUR_KEY_HERE

使用方法

该扩展包提供对 Client 对象的快捷访问

// Inside a controller
$client = $this->get('giantbomb.client');
$results = $client->search('Uncharted', 'game,franchise');

有关所有可能的用法,请参阅 dborsatto/php-giantbomb 文档。