Skip to content

intelekshual/giantbomb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Ruby wrapper for the GiantBomb API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages