GameFAQs Library
Access information about all games (any platform) from GameFAQs.
You can search for games by title and platform, and then view Reviews, FAQs, Cheats for it.
Installation
gem install Soleone-gamefaqs --source=http://gems.github.com
(Case sensitive!)
Getting started
require 'gamefaqs'
Find games and platforms
# Search for a game containing two words on the Nintendo DS
game = GameFaqs::Search.game("Castlevania Ecclesia", "DS")
# You can also search starting from the platform
snes = GameFaqs::Platform.find("snes")
game = snes.find("super mario world")
Reviews
# Get the average score from all reviews
game.average_score
# Get the average score from only detailed reviews (there are :detailed, :full and :quick)
game.average_score(:detailed)
# Get all reviews for this game
reviews = game.reviews
# Get only quick reviews for this game
reviews = game.reviews(:quick)
# Get the first review in the list
review = reviews.first
# Score in the format 9/10
review.score
# Get the full text of the review (original html stripped/converted)
review.text
# Other information
review.title
review.created_at
review.
Requirements
Hpricot (will be installed automatically by RubyGems as a dependency)
Issues
Speed! Because sometimes there have to be multiple webpages parsed at once.
For example to retrieve the names of all games for a platform, at least 26 pages need to be parsed (one for each letter of the alphabet). So better caching strategies are something to be worked on in the future.
Contribute
If you’re interested in this kind of stuff and want to help improve this library, feel free to fork this project and send me pull-requests/patches.