Ruby client for the API

  • I posted about this in the old forums, but I’ve finally updated and released a Ruby gem which interacts with the API. The gem is thegamesdb and you can find the source code on GitHub.

    If you have ruby on your command line you can do:

    $ gem install thegamesdb

    And start using it:

    $ irb
    2.3.1 :001 > require 'thegamesdb'
     => true 
    2.3.1 :002 > Gamesdb.platform 6
     => {:name=>"Super Nintendo (SNES)", :id=>"6", ...

    The full documentation is available on the GitHub repo. See Usage.

    The implemented methods so far are Get Platforms, Get Platform Games and Platform Games, Get Platform, Get Game, Get Games List and Get Art. The methods return an Array or Hash object with the parsed information from the API’s XML response.

    I plan on improving the code and adding the remaining methods.

    You can check it out on RubyGems and the source code is free software released under a MIT License.

  • Awesome!

Log in to reply