A Ruby gem to interact with TheGamesDB API
MIT License
Bot releases are visible (Hide)
Net::HTTP
errors such as 503 Service Unavailable and raises Gamesdb::Error
.Published by picandocodigo almost 2 years ago
Now testing Ruby versions 3.0, 3.1, 3.2, JRuby and TruffleRuby.
Gamesdb::Error
if there's any response from the server with status >= 300 (e.g. 403 for wrong API Key). I'll improve on this in future releases.Gamesdb::Utils
.Published by picandocodigo almost 4 years ago
Refactored code and functionality. The library was refactored in a way you need to instantiate a client with the API key to use it (more info in "Breaking changes"). 100% of the documented API is now supported and implemented.
The base API Response includes the remaining_monthly_allowance
for your API key, extra_allowance
and allowance_refresh_timer
. These values are updated on the client instance on every request so you can use client.remaining_monthly_client
to check how many requests the API key has left.
developers
games_update
genres
platforms_by_name
platforms_images
publishers
Dropped support for Ruby 2.4. The gem might still work on Ruby 2.4, but it's not being regularly tested for any version lower than 2.5.
You now need to instantiate the Gamesdb::Client class passing in the api_key. E.g:
> client = Gamesdb::Client.new(ENV['GAMESDB_API_KEY'])
> client = Gamesdb::Client.new('my_api_key')
> client.platforms
...
Changes in methods:
platform_by_id
changes to platforms_by_id
.
game_by_id
changes to games_by_id
.
game_images
changes to games_images
.
These APIs now support a string of comma delimited ids as parameters as well as the id Integer.
Published by picandocodigo over 4 years ago
The most important change for this version is the GamesDB API endpoint changed the url, so the gem is working again with this update.
v1
). From the forum:We've prefixed the api url with
/v1/
path to make it easier to version control the API going forward, so please update your apps to reflect that.
e.g https://api.thegamesdb.net/v1/Games/ByG ... e=platform
ruby-head
and truffleruby
in the Travis build. They look like config issues but I don't have time to look into it at the moment. Looking forward to work on the gem some more in the near future and I'll look into it.platform_id
parameter to games_by_name
page
parameter to games_by_name
games_by_name
responseprocess_platform_games
Check the CHANGELOG for other changes.
Published by picandocodigo about 5 years ago
page
parameter to games_by_platform_id
and includes boxart
.platforms
, updates tests. Changes :slug
to :alias
in platforms response, to map to same response from API.json_response
to use includes
and extra data from the API responseCheck the CHANGELOG for other changes.