A Ruby wrapper for the GiantBomb API

Configuration

GiantBomb::Api.key(API_KEY_HERE)

Resources

Current available resources:

  • Game
  • Company
  • Character

All resources have access to Resource#list, Resource#detail, and Resource#search.

Example


@game = Game.detail(1)
@games = Game.find("Duke Nukem")
@games = Game.list

Search

GiantBomb::Search defaults to using the GiantBomb search resource and is the basis for all other resource requests. The implementation is inspired by jnunemaker’s Twitter library.

All of the “filter” methods in GiantBomb::Search are chainable.

Usage


@search = GiantBomb::Search.new
@search.limit(10) # limits number of returned resources
@search.resources('game') # determines type(s) of resources
@search.fields('name,deck') # limits fields returned
@search.offset(100) # sets the offset
@search.query('duke nukem') # the query to search against
@search.fetch # makes request