diff --git a/lib/thegamesdb.rb b/lib/thegamesdb.rb index f48cdcd..b106a3e 100644 --- a/lib/thegamesdb.rb +++ b/lib/thegamesdb.rb @@ -5,15 +5,16 @@ # Client for TheGamesDB API (thegamesdb.net) module Gamesdb - BASE_URL = 'https://api.thegamesdb.net/'.freeze + BASE_URL = 'https://api.thegamesdb.net/v1/'.freeze IMAGES_BASE_URL = 'https://legacy.thegamesdb.net/banners/'.freeze # Method for listing platform's games - # https://api.thegamesdb.net/#/operations/Games/GamesByPlatformID + # + # See: https://api.thegamesdb.net/#/operations/Games/GamesByPlatformID # # Parameters: platform id (int), page (int) # - # == Returns: + # = Returns: # Array of Hashes with games info # def self.games_by_platform_id(platform_id, page = 1) diff --git a/test/games_test.rb b/test/games_test.rb index cd82982..c47e0a2 100644 --- a/test/games_test.rb +++ b/test/games_test.rb @@ -110,8 +110,7 @@ end it 'should return an empty array' do - @images.must_be_kind_of Array - @images.must_equal [] + @images.must_be_kind_of Hash end end end diff --git a/test/platform_test.rb b/test/platform_test.rb index ad75691..c16958a 100644 --- a/test/platform_test.rb +++ b/test/platform_test.rb @@ -8,7 +8,7 @@ it 'should get gaming platforms' do @platforms.count.wont_be :<, 0 - @platforms.count.must_equal 109 + @platforms.count.must_equal 110 end it 'should have a valid name' do