PHPackages                             amalfra/giantbomb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. amalfra/giantbomb

ActiveLibrary[API Development](/categories/api)

amalfra/giantbomb
=================

A PHP wrapper for GiantBomb API

v3.0.0(3y ago)664[1 PRs](https://github.com/amalfra/giantbomb/pulls)MITPHPPHP &gt;=8.1.0CI passing

Since Dec 1Pushed 3mo ago5 watchersCompare

[ Source](https://github.com/amalfra/giantbomb)[ Packagist](https://packagist.org/packages/amalfra/giantbomb)[ Docs](http://www.giantbomb.com/api)[ RSS](/packages/amalfra-giantbomb/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (5)Used By (0)

Giantbomb API
=============

[](#giantbomb-api)

[![GitHub release](https://camo.githubusercontent.com/b50e2f905c80cfe0fbac51a24537262a76e560b4e69952b5c5cb0ed1284476c9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f616d616c6672612f4769616e74426f6d622e737667)](https://github.com/amalfra/GiantBomb/releases)[![Build Status](https://github.com/amalfra/giantbomb/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/amalfra/giantbomb/actions/workflows/test.yml/badge.svg?branch=main)[![Coverage Status](https://camo.githubusercontent.com/e7de5182399a8289aa314267537bc0605abc939dae984f8e235cbdbd5a10bfcd/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f616d616c6672612f6769616e74626f6d622f62616467652e737667)](https://coveralls.io/github/amalfra/giantbomb)

A library for easy interaction with Giantbomb API. Features are:

- Caching support

> Get your API Key at

Requirements
------------

[](#requirements)

- PHP Redis extension. It can be installed using following command:

```
pecl install redis
```

Installation
------------

[](#installation)

```
composer require amalfra/giantbomb
```

This will create a vendor directory (if you dont already have one) and set up the autoloading classmap.

Usage
-----

[](#usage)

Once everything is installed, you should be able to load the composer autoloader in your code.

You can load the wrapper classes using namespace as:

```
require __DIR__ . '/vendor/autoload.php';

use \Amalfra\GiantBomb\Client as GiantBomb;
```

Now create a new object

```
$config = array(
	'token' => 'YOUR_KEY',
);

$gb_obj = new GiantBomb($config);
```

Now the available API methods can be called using the instance. All the result from API will be returned as an object. If any status code other than 200 is returned an exception would be thrown.

### Currently Available Methods

[](#currently-available-methods)

MethodDescriptiongame(game\_id, field\_list)field\_list should be comma seperated valuesgames(
 field\_list: 'name,id',
 limit: 10,
 offset: 20,
 platforms: 2,
 sort: 'id:desc',
 filter: 'aliases:Desert Strike'
)company(company\_id, field\_list)field\_list should be comma seperated valuescompanies(
 field\_list: 'name,id',
 limit: 10,
 offset: 20,
 sort: 'id:desc',
 filter: 'id:7'
)genre(genre\_id, field\_list)field\_list should be comma seperated valuesgenres(
 field\_list: 'name,id',
 limit: 10,
 offset: 20
)platform(platform\_id, field\_list)field\_list should be comma seperated valuesplatforms(
 field\_list: 'name,id',
 limit: 10,
 offset: 20,
 sort: 'id:desc',
 filter: 'id:3'
)review(review\_id, field\_list)field\_list should be comma seperated valuesreviews(
 field\_list: 'deck,id',
 limit: 10,
 offset: 20,
 sort: 'id:desc',
 filter: 'id:3'
)game\_rating(game\_rating\_id, field\_list)field\_list should be comma seperated valuesgame\_ratings(
 field\_list: 'name,id',
 limit: 10,
 offset: 20,
 sort: 'id:desc',
 filter: 'id:3'
)character(character\_id, field\_list)field\_list should be comma seperated valuescharacters(
 field\_list: 'name,id',
 limit: 10,
 offset: 20,
 sort: 'id:desc',
 filter: 'id:3'
)search(
 field\_list: 'name,id',
 query: halo'',
 limit: 20,
 page: 2
 resources: 'game',
)### Cache

[](#cache)

You can configure caching to prevent hitting API if same queries are made again. Currently supported caching methods are:

- inmemory: cache will be stored in memory array. This won't be persisted after your script exits.
- redis: cache will be stored in redis store which can be configured.

Cache can be configured using `set_cache_provider` method of GiantBomb instance. If it's not configured caching will be disabled and API will always be hit each time a method is called. `set_cache_provider` method accepts two parameter:

1. \[required\] cache type eg: inmemory, redis etc
2. \[optional\] an associative array in which additional configuration details required for setting up the cache method can be given eg: redis server host and port values

#### using inmemory cache method

[](#using-inmemory-cache-method)

This method does not need any additional configuration option than just activating by calling `set_cache_provider` method with `inmemory` as first parameter. eg:

```
$gb_obj->set_cache_provider('inmemory');
```

#### using redis cache method

[](#using-redis-cache-method)

This method can be activated by calling `set_cache_provider` method with `redis` as first parameter. You will also need to specify redis server host and port as second parameter. eg:

```
$gb_obj->set_cache_provider('redis', array('host' => 'localhost', 'port' => 6379));
```

Development
-----------

[](#development)

Questions, problems or suggestions? Please post them on the [issue tracker](https://github.com/amalfra/giantbomb/issues).

You can contribute changes by forking the project and submitting a pull request. Feel free to contribute 😍

UNDER MIT LICENSE
=================

[](#under-mit-license)

The MIT License (MIT)

Copyright (c) 2013 Amal Francis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance54

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 97.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~863 days

Total

3

Last Release

1356d ago

Major Versions

v1.0.0 → v2.0.02017-12-07

v2.0.0 → v3.0.02022-08-24

PHP version history (3 changes)v1.0.0PHP &gt;=5.3.0

v2.0.0PHP ^7.0.0

v3.0.0PHP &gt;=8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/62dbb66d7ae914eb60df0092be27d4402b31c3f9dfdfb020978b99ac487657f4?d=identicon)[amalfra](/maintainers/amalfra)

---

Top Contributors

[![amalfra](https://avatars.githubusercontent.com/u/4033256?v=4)](https://github.com/amalfra "amalfra (107 commits)")[![koroban](https://avatars.githubusercontent.com/u/148569?v=4)](https://github.com/koroban "koroban (2 commits)")[![bitdeli-chef](https://avatars.githubusercontent.com/u/3092978?v=4)](https://github.com/bitdeli-chef "bitdeli-chef (1 commits)")

---

Tags

giantbombgiantbomb-apiphpwrapperphpapiwrappergiantbomb

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/amalfra-giantbomb/health.svg)

```
[![Health](https://phpackages.com/badges/amalfra-giantbomb/health.svg)](https://phpackages.com/packages/amalfra-giantbomb)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
