games_radar 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +5 -0
- data/README.rdoc +50 -0
- data/lib/games-radar.rb +1 -0
- data/lib/games_radar.rb +34 -0
- data/lib/games_radar/config.rb +20 -0
- data/lib/games_radar/errors.rb +21 -0
- data/lib/games_radar/game.rb +93 -0
- data/lib/games_radar/genre.rb +36 -0
- data/lib/games_radar/platform.rb +41 -0
- data/lib/games_radar/request.rb +104 -0
- data/lib/games_radar/result.rb +46 -0
- data/lib/games_radar/version.rb +8 -0
- data/test/config_test.rb +10 -0
- data/test/game_test.rb +92 -0
- data/test/games_radar_test.rb +11 -0
- data/test/genre_test.rb +14 -0
- data/test/platform_test.rb +15 -0
- data/test/request_test.rb +32 -0
- data/test/resources/game.xml +1 -0
- data/test/resources/game_not_found.xml +1 -0
- data/test/resources/games.xml +37 -0
- data/test/resources/invalid_api_key.xml +1 -0
- data/test/resources/no_games.xml +1 -0
- data/test/resources/platforms.xml +1 -0
- data/test/test_helper.rb +21 -0
- metadata +94 -0
data/CHANGELOG.rdoc
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
= Introduction
|
2
|
+
|
3
|
+
GamesRadar is an API wrapper for the games website GamesRadar[http://gamesradar.com]. For now it only supports basic functionality like game listing and game lookup.
|
4
|
+
|
5
|
+
= Install
|
6
|
+
|
7
|
+
sudo gem install games_radar
|
8
|
+
|
9
|
+
If you want the source go to http://github.com/fnando/games_radar
|
10
|
+
|
11
|
+
= Usage
|
12
|
+
|
13
|
+
require "games_radar"
|
14
|
+
|
15
|
+
# Retrieve 50 games sorted by the newest titles
|
16
|
+
result = GamesRadar.all
|
17
|
+
|
18
|
+
result.each do |game|
|
19
|
+
p game.title
|
20
|
+
p game.description
|
21
|
+
p game.name
|
22
|
+
p game.platform
|
23
|
+
p game.genre
|
24
|
+
end
|
25
|
+
|
26
|
+
# Retrieve a game by its id
|
27
|
+
Game.find("20060713144458560042")
|
28
|
+
|
29
|
+
# Other usages
|
30
|
+
GamesRadar.all(:page => 10)
|
31
|
+
GamesRadar.all(:size => 30)
|
32
|
+
GamesRadar.all(:filter => "0-9")
|
33
|
+
GamesRadar.all(:sort => :updated)
|
34
|
+
GamesRadar.all(:genre => :sports)
|
35
|
+
|
36
|
+
For full usage information, check it out the API (GamesRadar::Game#all).
|
37
|
+
|
38
|
+
= License
|
39
|
+
|
40
|
+
(The MIT License)
|
41
|
+
|
42
|
+
Copyright © 2010:
|
43
|
+
|
44
|
+
* Nando Vieira (http://simplesideias.com.br)
|
45
|
+
|
46
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
47
|
+
|
48
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
49
|
+
|
50
|
+
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/games-radar.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "games_radar"
|
data/lib/games_radar.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require "cgi"
|
2
|
+
require "nokogiri"
|
3
|
+
require "open-uri"
|
4
|
+
require "uri"
|
5
|
+
|
6
|
+
require "games_radar/request"
|
7
|
+
require "games_radar/config"
|
8
|
+
require "games_radar/errors"
|
9
|
+
require "games_radar/game"
|
10
|
+
require "games_radar/genre"
|
11
|
+
require "games_radar/platform"
|
12
|
+
require "games_radar/result"
|
13
|
+
require "games_radar/version"
|
14
|
+
|
15
|
+
module GamesRadar
|
16
|
+
# Use this shortcut for GamesRadar::Config. Refer to the GamesRadar::Config
|
17
|
+
# for all available options.
|
18
|
+
#
|
19
|
+
# Instead of setting values like
|
20
|
+
#
|
21
|
+
# GamesRadar::Config.api_key = "SxKuVse22qqUcZXq"
|
22
|
+
#
|
23
|
+
# You can write it as
|
24
|
+
#
|
25
|
+
# GamesRadar.setup do |c|
|
26
|
+
# c.api_key = "SxKuVse22qqUcZXq"
|
27
|
+
# end
|
28
|
+
def self.setup(&block)
|
29
|
+
yield GamesRadar::Config
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
# Set up default values
|
34
|
+
GamesRadar::Config.defaults!
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module GamesRadar
|
2
|
+
class Config
|
3
|
+
class << self
|
4
|
+
# Set your API key that is sent in every request.
|
5
|
+
# To request your own API key, just go to http://www.gamesradar.com/api-key-request
|
6
|
+
attr_accessor :api_key
|
7
|
+
|
8
|
+
# Set how many items the API will return. Defaults to 50.
|
9
|
+
attr_accessor :page_size
|
10
|
+
end
|
11
|
+
|
12
|
+
# Restore all default attributes accepted by GamesRadar::Config class.
|
13
|
+
def self.defaults!
|
14
|
+
GamesRadar.setup do |c|
|
15
|
+
c.api_key = nil
|
16
|
+
c.page_size = 50
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module GamesRadar
|
2
|
+
# The GamesRadar::InvalidApiKeyError is raised when the request returns the code
|
3
|
+
# 10001.
|
4
|
+
class InvalidApiKeyError < StandardError
|
5
|
+
def message # :nodoc:
|
6
|
+
"Your API key is invalid. Visit http://www.gamesradar.com/api-key-request to register one."
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
# The GamesRadar::UnknownPlatformError is raised when an invalid platform id is
|
11
|
+
# informed while instantiating a new GamesRadar::Platform object.
|
12
|
+
class UnknownPlatformError < StandardError; end
|
13
|
+
|
14
|
+
# The GamesRadar::UnknownGenreError is raised when an invalid genre id is
|
15
|
+
# informed while instantiating a new GamesRadar::Genre object.
|
16
|
+
class UnknownGenreError < StandardError; end
|
17
|
+
|
18
|
+
# The GamesRadar::GameNotFoundError is raised when a game is not found by
|
19
|
+
# the provided id.
|
20
|
+
class GameNotFoundError < StandardError; end
|
21
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
module GamesRadar
|
2
|
+
class Game
|
3
|
+
include GamesRadar::Request
|
4
|
+
extend GamesRadar::Request
|
5
|
+
|
6
|
+
# The game id
|
7
|
+
attr_reader :id
|
8
|
+
|
9
|
+
# The game name. The hash contains both US and UK names.
|
10
|
+
attr_reader :name
|
11
|
+
|
12
|
+
# The console platform. Is a GamesRadar::Platform instance.
|
13
|
+
attr_reader :platform
|
14
|
+
|
15
|
+
# The game genre. Is a GamesRadar::Genre instance.
|
16
|
+
attr_reader :genre
|
17
|
+
|
18
|
+
# The game description
|
19
|
+
attr_reader :description
|
20
|
+
|
21
|
+
# Retrieve the game list.
|
22
|
+
#
|
23
|
+
# == Options
|
24
|
+
#
|
25
|
+
# * +:filter+: filter the results by title. You can specify a letter from +a+ to +z+ or +0-9+.
|
26
|
+
# * +:genre+: set the game genre. Can be +all+ or any value from GamesRadar::Genre::GENRES.
|
27
|
+
# * +:page+: set the current page. If a page is not found, an empty array will be returned.
|
28
|
+
# * +:platform+: set the console platform. Can be +all+ or any code returned by GamesRadar::Platform#code
|
29
|
+
# * +:sort+: specify how the result will be sorted. The available options are +newest+, +oldest+, +updated+, +asc+ and +desc+.
|
30
|
+
def self.all(options = {})
|
31
|
+
options = {
|
32
|
+
:page => 1,
|
33
|
+
:size => GamesRadar::Config.page_size,
|
34
|
+
:sort => :newest
|
35
|
+
}.merge(options)
|
36
|
+
|
37
|
+
request "/games", options do |xml|
|
38
|
+
total_rows = xml.at("total_rows").inner_text.to_i
|
39
|
+
items = xml.search("game").collect {|node| new(node) }
|
40
|
+
|
41
|
+
GamesRadar::Result.new(
|
42
|
+
:items => items,
|
43
|
+
:page_size => options[:size],
|
44
|
+
:count => total_rows
|
45
|
+
)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initialize a GamesRadar::Game object with a game node.
|
50
|
+
def self.initialize_with_node(xml) # :nodoc:
|
51
|
+
raise GamesRadar::GameNotFoundError unless xml.at("id")
|
52
|
+
|
53
|
+
new(
|
54
|
+
:id => xml.at("id").inner_text,
|
55
|
+
:name => {
|
56
|
+
:us => xml.at("name > us").inner_text,
|
57
|
+
:uk => xml.at("name > uk").inner_text
|
58
|
+
},
|
59
|
+
:platform => GamesRadar::Platform.new(xml.at("platform > id").inner_text),
|
60
|
+
:genre => GamesRadar::Genre.new(xml.at("genre > id").inner_text),
|
61
|
+
:description => Nokogiri(xml.at("description").inner_text).inner_text
|
62
|
+
)
|
63
|
+
end
|
64
|
+
|
65
|
+
# Return a game with the specified id.
|
66
|
+
#
|
67
|
+
# game = GamesRadar::Game.find("2005120717014294613647")
|
68
|
+
#
|
69
|
+
def self.find(id)
|
70
|
+
request "/game/:id", :id => id do |xml|
|
71
|
+
Game.initialize_with_node(xml.search("game"))
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Initialize a new game object and set the hash to its
|
76
|
+
# attributes.
|
77
|
+
#
|
78
|
+
# game = GamesRadar::Game.new(
|
79
|
+
# :id => "2005120717014294613647",
|
80
|
+
# :name => "Grand Theft Auto: San Andreas"
|
81
|
+
# )
|
82
|
+
def initialize(attrs = {})
|
83
|
+
attrs.each do |name, value|
|
84
|
+
instance_variable_set("@#{name}", value)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# Return the US game as main title.
|
89
|
+
def title
|
90
|
+
name[:us]
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module GamesRadar
|
2
|
+
class Genre
|
3
|
+
GENRES = {
|
4
|
+
"1" => :action,
|
5
|
+
"2" => :fighting,
|
6
|
+
"3" => :adventure,
|
7
|
+
"4" => :arcade,
|
8
|
+
"5" => :racing,
|
9
|
+
"6" => :shooter,
|
10
|
+
"7" => :flight,
|
11
|
+
"8" => :strategy,
|
12
|
+
"9" => :rpg,
|
13
|
+
"10" => :sports,
|
14
|
+
"11" => :other,
|
15
|
+
"12" => :family,
|
16
|
+
"13" => :children,
|
17
|
+
"14" => :puzzle,
|
18
|
+
"15" => :simulation
|
19
|
+
}
|
20
|
+
|
21
|
+
# The genre id
|
22
|
+
attr_reader :id
|
23
|
+
|
24
|
+
# The genre name
|
25
|
+
attr_reader :name
|
26
|
+
|
27
|
+
# Set up genre attributes based on the specified id.
|
28
|
+
# The available genres can be found on the GamesRadar::Genre::GENRES constant.
|
29
|
+
def initialize(id)
|
30
|
+
@id = id.to_s
|
31
|
+
@name = GENRES[@id]
|
32
|
+
|
33
|
+
raise GamesRadar::UnknownGenreError unless name
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module GamesRadar
|
2
|
+
class Platform
|
3
|
+
PLATFORMS = {
|
4
|
+
"1" => ["XBox", :xbox],
|
5
|
+
"2" => ["PlayStation 2", :ps2],
|
6
|
+
"3" => ["Game Boy", :gameboy],
|
7
|
+
"4" => ["PC", :pc],
|
8
|
+
"5" => ["PlayStation 3", :ps3],
|
9
|
+
"6" => ["PSP", :psp],
|
10
|
+
"7" => ["XBox 360", :xbox360],
|
11
|
+
"8" => ["GameCube", :gc],
|
12
|
+
"9" => ["Nintendo DS", :ds],
|
13
|
+
"11" => ["Wii", :wii],
|
14
|
+
"12" => ["Nintendo", :nes],
|
15
|
+
"13" => ["Super Nintendo", :snes],
|
16
|
+
"14" => ["Genesis", :genesis],
|
17
|
+
"15" => ["Saturn", :saturn],
|
18
|
+
"2005120714112598110961" => ["Game Boy Advanced", :gba],
|
19
|
+
"2005120714112685461425" => ["PlayStation", :ps1],
|
20
|
+
"2005120714112722229003" => ["Nintendo 64", :n64],
|
21
|
+
"2005120714112823431396" => ["Dreamcast", :dc]
|
22
|
+
}
|
23
|
+
|
24
|
+
# The platform id
|
25
|
+
attr_reader :id
|
26
|
+
|
27
|
+
# The platform name
|
28
|
+
attr_reader :name
|
29
|
+
|
30
|
+
# The platform code
|
31
|
+
attr_reader :code
|
32
|
+
|
33
|
+
# Set up platform attributes based on the specified id.
|
34
|
+
# The available platforms can be found on the GamesRadar::Platform::PLATFORMS constant.
|
35
|
+
def initialize(id)
|
36
|
+
@id = id.to_s
|
37
|
+
raise GamesRadar::UnknownPlatformError unless PLATFORMS[@id]
|
38
|
+
@name, @code = PLATFORMS[@id]
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
module GamesRadar
|
2
|
+
module Request
|
3
|
+
# The base url points to the latest API version.
|
4
|
+
BASE_URL = "http://api.gamesradar.com"
|
5
|
+
|
6
|
+
# Genre values that should be replaced for a more textual equivalent.
|
7
|
+
GENRE = {
|
8
|
+
:children => "children's",
|
9
|
+
:other => "other games/compilations",
|
10
|
+
:rpg => "role playing",
|
11
|
+
:sports => "sport games"
|
12
|
+
}
|
13
|
+
|
14
|
+
# Sort values that should be replaced for the expected API value.
|
15
|
+
SORT = {
|
16
|
+
:asc => "a-z",
|
17
|
+
:desc => "z-a"
|
18
|
+
}
|
19
|
+
|
20
|
+
# Replace pretty params name for its ugly counter-part.
|
21
|
+
PARAMS = {
|
22
|
+
:page => :page_num,
|
23
|
+
:size => :page_size,
|
24
|
+
:filter => :game_name
|
25
|
+
}
|
26
|
+
|
27
|
+
# Make a API request processing the provided parameters and
|
28
|
+
# merging the API key in every request.
|
29
|
+
#
|
30
|
+
# include GamesRadar::Request
|
31
|
+
#
|
32
|
+
# request "/game", :id => "2005120717014294613647" do |xml|
|
33
|
+
# # do whatever you want with the response XML
|
34
|
+
# end
|
35
|
+
def request(path, params = {}, &block)
|
36
|
+
uri = uri_for(path, params.dup)
|
37
|
+
xml = Nokogiri::XML(open(uri).read)
|
38
|
+
|
39
|
+
handle_exceptions! xml
|
40
|
+
|
41
|
+
yield xml
|
42
|
+
end
|
43
|
+
|
44
|
+
# Raise exception when XML contains known error codes
|
45
|
+
def handle_exceptions!(xml) # :nodoc:
|
46
|
+
case xml.search("error > code").inner_text.to_i
|
47
|
+
when 10001 then raise GamesRadar::InvalidApiKeyError
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Generate a URI based on the specified path and params.
|
52
|
+
def uri_for(path, params) # :nodoc:
|
53
|
+
prepare_params!(params)
|
54
|
+
prepare_named_params!(path, params)
|
55
|
+
|
56
|
+
URI.parse [File.join(BASE_URL, path), to_query_string(params)].join("?")
|
57
|
+
end
|
58
|
+
|
59
|
+
# Convert to query string.
|
60
|
+
# Value is already escaped by the <tt>prepare_params!</tt> method.
|
61
|
+
def to_query_string(params) # :nodoc:
|
62
|
+
params = params.collect do |name, value|
|
63
|
+
"%s=%s" % [CGI.escape(name.to_s), value]
|
64
|
+
end
|
65
|
+
|
66
|
+
params.join("&")
|
67
|
+
end
|
68
|
+
|
69
|
+
# Modify the specified params hash by escaping each of its values.
|
70
|
+
# Also merge the API key into this params hash.
|
71
|
+
def prepare_params!(params) # :nodoc:
|
72
|
+
raise GamesRadar::InvalidApiKeyError unless GamesRadar::Config.api_key
|
73
|
+
|
74
|
+
params.merge!(:api_key => GamesRadar::Config.api_key)
|
75
|
+
|
76
|
+
params.each do |name, value|
|
77
|
+
name = PARAMS[name.to_sym] || name.to_sym
|
78
|
+
value = value.to_s.to_sym
|
79
|
+
|
80
|
+
case name
|
81
|
+
when :genre then
|
82
|
+
value = GENRE[value] if GENRE[value]
|
83
|
+
when :sort then
|
84
|
+
value = SORT[value] if SORT[value]
|
85
|
+
end
|
86
|
+
|
87
|
+
params.merge!(name => CGI.escape(value.to_s))
|
88
|
+
end
|
89
|
+
|
90
|
+
# Remove options that are replaced
|
91
|
+
[:page, :size, :filter].each do |param|
|
92
|
+
params.delete(param) && params.delete(param.to_s)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# Replace a named param for its value on the specified path.
|
97
|
+
def prepare_named_params!(path, params) # :nodoc:
|
98
|
+
path.gsub!(/(:[a-z0-9]+)/) do |param|
|
99
|
+
param = param.gsub(/:/, "").to_sym
|
100
|
+
params.delete(param)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module GamesRadar
|
2
|
+
class Result
|
3
|
+
# The total rows returned by the API
|
4
|
+
attr_reader :count
|
5
|
+
|
6
|
+
# The total pages
|
7
|
+
attr_reader :pages
|
8
|
+
|
9
|
+
# The items array
|
10
|
+
attr_reader :items
|
11
|
+
|
12
|
+
# The number of items per page
|
13
|
+
attr_reader :page_size
|
14
|
+
|
15
|
+
# Initialize a GamesRadar::Result by using a hash.
|
16
|
+
def initialize(options = {})
|
17
|
+
options.each do |name, value|
|
18
|
+
instance_variable_set("@#{name}", value)
|
19
|
+
end
|
20
|
+
|
21
|
+
calculate_page_size
|
22
|
+
end
|
23
|
+
|
24
|
+
# A shortcut for <tt>GamesRadar::Result#items.each</tt>
|
25
|
+
def each(&block)
|
26
|
+
items.each do |item|
|
27
|
+
yield item
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# A shortcut for <tt>GamesRadar::Result#items.each_with_index</tt>
|
32
|
+
def each_with_index(&block)
|
33
|
+
items.each_with_index do |item, i|
|
34
|
+
yield item, i
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def calculate_page_size # :nodoc:
|
39
|
+
if items.size == 0
|
40
|
+
@pages = 0
|
41
|
+
else
|
42
|
+
@pages = (count.to_f / page_size).ceil
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/test/config_test.rb
ADDED
data/test/game_test.rb
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
class GamesRadar::GameTest < Test::Unit::TestCase
|
4
|
+
def setup
|
5
|
+
GamesRadar::Config.api_key = "SxKuVse22qqUcZXq"
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_find_game_by_id
|
9
|
+
register_uri "/game/20060713144458560042?api_key=SxKuVse22qqUcZXq", "game.xml"
|
10
|
+
game = GamesRadar::Game.find("20060713144458560042")
|
11
|
+
|
12
|
+
assert_kind_of GamesRadar::Game, game
|
13
|
+
assert_kind_of GamesRadar::Game, game
|
14
|
+
assert_kind_of GamesRadar::Genre, game.genre
|
15
|
+
assert_equal "20060713144458560042", game.id
|
16
|
+
assert_equal "God of War III", game.name[:us]
|
17
|
+
assert_equal "God of War 3", game.name[:uk]
|
18
|
+
assert_equal "God of War III", game.title
|
19
|
+
assert_match /mythology’s darkest creatures/, game.description
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_raise_error_when_game_is_not_found
|
23
|
+
register_uri "/game/0000?api_key=SxKuVse22qqUcZXq", "game_not_found.xml"
|
24
|
+
assert_raise(GamesRadar::GameNotFoundError) { GamesRadar::Game.find("0000") }
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_return_list_game_with_defaults
|
28
|
+
register_uri "/games?api_key=SxKuVse22qqUcZXq&page_size=50&page_num=1&sort=newest", "games.xml"
|
29
|
+
result = GamesRadar::Game.all
|
30
|
+
|
31
|
+
assert_equal 50, result.items.size
|
32
|
+
assert_equal 12242, result.count
|
33
|
+
assert_equal 245, result.pages
|
34
|
+
assert_equal 50, result.page_size
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_no_game_list
|
38
|
+
register_uri "/games?api_key=SxKuVse22qqUcZXq&page_size=50&page_num=1&sort=newest", "no_games.xml"
|
39
|
+
result = GamesRadar::Game.all
|
40
|
+
|
41
|
+
assert_equal 0, result.items.size
|
42
|
+
assert_equal 0, result.pages
|
43
|
+
assert_equal 0, result.count
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_game_list_with_custom_options
|
47
|
+
register_uri "/games?api_key=SxKuVse22qqUcZXq&page_size=5&page_num=10&sort=updated&genre=sport+games&game_name=a", "games.xml"
|
48
|
+
result = GamesRadar::Game.all(:page => 10, :size => 5, :filter => :a, :genre => :sports, :sort => :updated)
|
49
|
+
|
50
|
+
assert_equal 50, result.items.size
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_game_list_sorted_by_asc
|
54
|
+
register_uri "/games?api_key=SxKuVse22qqUcZXq&page_size=50&page_num=1&sort=a-z", "games.xml"
|
55
|
+
result = GamesRadar::Game.all(:sort => :asc)
|
56
|
+
|
57
|
+
assert_equal 50, result.items.size
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_game_list_sorted_by_desc
|
61
|
+
register_uri "/games?api_key=SxKuVse22qqUcZXq&page_size=50&page_num=1&sort=z-a", "games.xml"
|
62
|
+
result = GamesRadar::Game.all(:sort => :desc)
|
63
|
+
|
64
|
+
assert_equal 50, result.items.size
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_game_list_filtered_by_numbers
|
68
|
+
register_uri "/games?api_key=SxKuVse22qqUcZXq&page_size=50&page_num=1&game_name=0-9&sort=newest", "games.xml"
|
69
|
+
result = GamesRadar::Game.all(:filter => "0-9")
|
70
|
+
|
71
|
+
assert_equal 50, result.items.size
|
72
|
+
end
|
73
|
+
|
74
|
+
def test_each
|
75
|
+
register_uri "/games?api_key=SxKuVse22qqUcZXq&page_size=50&page_num=1&sort=newest", "games.xml"
|
76
|
+
result = GamesRadar::Game.all
|
77
|
+
|
78
|
+
result.each do |game|
|
79
|
+
assert_kind_of GamesRadar::Game, game
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def test_each_with_index
|
84
|
+
register_uri "/games?api_key=SxKuVse22qqUcZXq&page_size=50&page_num=1&sort=newest", "games.xml"
|
85
|
+
result = GamesRadar::Game.all
|
86
|
+
|
87
|
+
result.each_with_index do |game, i|
|
88
|
+
assert_kind_of GamesRadar::Game, game
|
89
|
+
assert_kind_of Integer, i
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
data/test/genre_test.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
class GamesRadar::GenreTest < Test::Unit::TestCase
|
4
|
+
def test_raise_invalid_genre_id
|
5
|
+
assert_raise(GamesRadar::UnknownGenreError) { GamesRadar::Genre.new("invalid") }
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_set_attributes_for_valid_id
|
9
|
+
genre = GamesRadar::Genre.new(1)
|
10
|
+
|
11
|
+
assert_equal :action, genre.name
|
12
|
+
assert_equal "1", genre.id
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
class GamesRadar::PlatformTest < Test::Unit::TestCase
|
4
|
+
def test_raise_invalid_platform_id
|
5
|
+
assert_raise(GamesRadar::UnknownPlatformError) { GamesRadar::Platform.new("invalid") }
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_set_attributes_for_valid_id
|
9
|
+
platform = GamesRadar::Platform.new(5)
|
10
|
+
|
11
|
+
assert_equal "PlayStation 3", platform.name
|
12
|
+
assert_equal "5", platform.id
|
13
|
+
assert_equal :ps3, platform.code
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
class GamesRadar::GenreTest < Test::Unit::TestCase
|
4
|
+
def setup
|
5
|
+
GamesRadar::Config.api_key = "SxKuVse22qqUcZXq"
|
6
|
+
@request = Object.extend(GamesRadar::Request)
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_replace_rpg_value_for_genre
|
10
|
+
options = {:genre => :rpg}
|
11
|
+
@request.prepare_params!(options)
|
12
|
+
assert_equal "role+playing", options[:genre]
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_replace_other_value_for_genre
|
16
|
+
options = {:genre => :other}
|
17
|
+
@request.prepare_params!(options)
|
18
|
+
assert_equal "other+games%2Fcompilations", options[:genre]
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_replace_children_value_for_genre
|
22
|
+
options = {:genre => :children}
|
23
|
+
@request.prepare_params!(options)
|
24
|
+
assert_equal "children%27s", options[:genre]
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_replace_sports_value_for_genre
|
28
|
+
options = {:genre => :sports}
|
29
|
+
@request.prepare_params!(options)
|
30
|
+
assert_equal "sport+games", options[:genre]
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?><game xmlns='http://api.gamesradar.com'><id>20060713144458560042</id><name><us><![CDATA[God of War III]]></us><uk><![CDATA[God of War 3]]></uk></name><description><![CDATA[<p>Armed with double-chained blades, and an array of new weapons and magic for this iteration of the trilogy, Kratos must take on mythology’s darkest creatures while solving intricate puzzles throughout his merciless quest to destroy Olympus.</p>]]></description><platform><id>5</id><name>PS3</name></platform><genre><id>1</id><name>Action</name></genre><designer><![CDATA[David Jaffe]]></designer><developers><company><id>20081215142411289058</id><name><![CDATA[SCE Santa Monica Studios]]></name></company></developers><publishers><us><company><id>200601179550718056</id><name><![CDATA[Sony]]></name></company></us><uk><company><id>200601179550718056</id><name><![CDATA[Sony]]></name></company></uk></publishers><expected_release_date><us>March 2010</us><uk>March 2010</uk></expected_release_date><updated_date>2009-06-02T16:51:10.00+0000</updated_date><url>http://www.gamesradar.com/ps3/god-of-war-iii/g-20060713144458560042</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/G/God%20of%20War%20II/Everything%20Else/ART/Finished/0313_gow2_thmb--game_thumbnail.jpg]]></thumbnail></images><multiplayer_modes><offline>1 player SOLO</offline></multiplayer_modes><links><news>/ps3/god-of-war-iii/news/b/g-20060713144458560042</news><previews>/ps3/god-of-war-iii/previews/g-20060713144458560042</previews><features>/ps3/god-of-war-iii/features/g-20060713144458560042</features><screenshots>/ps3/god-of-war-iii/screenshots/g-20060713144458560042</screenshots><videos>/ps3/god-of-war-iii/videos/g-20060713144458560042</videos><rss>http://www.gamesradar.com/ps3/god-of-war-iii/rss/g-20060713144458560042</rss></links></game>
|
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?><game xmlns='http://api.gamesradar.com'></game>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?><games xmlns='http://api.gamesradar.com'><total_rows>12242</total_rows><game><id>2010021212412814054</id><name><us><![CDATA[Age of Conan: Rise of the Godslayer]]></us><uk><![CDATA[Age of Conan: Rise of the Godslayer]]></uk></name><description><![CDATA[<p>This expansion to Age of Conan: Hyborin Adventures allows players to embark on the most savage, sexy and brutal Conan adventure yet as they descend into the shadows that have fallen over Khitai, fabled empire of the east.</p>
|
2
|
+
]]></description><platform><id>4</id><name>PC</name></platform><url>http://www.gamesradar.com/pc/age-of-conan-rise-of-the-godslayer/g-2010021212412814054</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/A/Age%20of%20Conan%20Rise%20of%20the%20Godslayer/Everything%20else/ConanThumb--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>201002111571426007</id><name><us><![CDATA[Alice in Wonderland]]></us><uk><![CDATA[Alice in Wonderland]]></uk></name><platform><id>9</id><name>DS</name></platform><url>http://www.gamesradar.com/ds/alice-in-wonderland/g-201002111571426007</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/A/Alice%20in%20Wonderland/Bulk%20Viewers/DS/2010-02-11/DS_Alice_in_Wonderland4--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010021115443762020</id><name><us><![CDATA[Alice in Wonderland]]></us><uk><![CDATA[Alice in Wonderland]]></uk></name><platform><id>11</id><name>Wii</name></platform><url>http://www.gamesradar.com/wii/alice-in-wonderland/g-2010021115443762020</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/A/Alice%20in%20Wonderland/Bulk%20Viewers/Wii/2010-02-11/Alice_2009_55-32_f2299--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100211142329903077</id><name><us><![CDATA[Samurai Shodown Sen]]></us><uk><![CDATA[Samurai Shodown Sen]]></uk></name><description><![CDATA[The classic 2D fighter returns, this time taking the Feudal Japan based swordplay into the third dimension.]]></description><platform><id>7</id><name>Xbox 360</name></platform><url>http://www.gamesradar.com/xbox360/samurai-shodown-sen/g-20100211142329903077</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/S/Samurai%20Shodown%20Sen/Bulk%20Viewer/360/2010-02-11/lightningblow(perfect%20input)--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100211104824474081</id><name><us><![CDATA[M.U.D. TV]]></us><uk><![CDATA[M.U.D. TV]]></uk></name><description><![CDATA[<p align="left"><font face="Verdana,Bold" size="2">The acronym stands for 'Mad, Ugly, Dirty Television'. Call the shots as a top TV Exec in this Sims-style game, striving to the ratings and bring in the advertising revenue for your own TV station.</font></p>
|
3
|
+
]]></description><platform><id>4</id><name>PC</name></platform><url>http://www.gamesradar.com/pc/mud-tv/g-20100211104824474081</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/M/MUD%20TV/Everything%20else/MudTVThumb--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010021014466725003</id><name><us><![CDATA[EA Sports Active: More Workouts]]></us><uk><![CDATA[EA Sports Active: More Workouts]]></uk></name><description><![CDATA[<p>For those that didn't get enough exercise in the first game, here's a new release filled with additional workouts for your fat self.</p>
|
4
|
+
]]></description><platform><id>11</id><name>Wii</name></platform><release_date><us>2009-11-17T00:00:00.00+0000</us><uk>2009-11-20T00:00:00.00+0000</uk></release_date><updated_date>2009-11-17T00:00:00.00+0000</updated_date><url>http://www.gamesradar.com/wii/ea-sports-active-more-workouts/g-2010021014466725003</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/E/EA%20Sports%20Active%20More%20Workouts/Bulk%20Viewer/Wii/2010-02-10/ea_wii_226_final--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100210104948785010</id><name><us><![CDATA[Tom Clancy's Ghost Recon: Future Soldier]]></us><uk><![CDATA[Tom Clancy's Ghost Recon: Future Soldier]]></uk></name><platform><id>7</id><name>Xbox 360</name></platform><url>http://www.gamesradar.com/xbox360/tom-clancys-ghost-recon-future-soldier/g-20100210104948785010</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100210104953504037</id><name><us><![CDATA[Tom Clancy's Ghost Recon: Future Soldier]]></us><uk><![CDATA[Tom Clancy's Ghost Recon: Future Soldier]]></uk></name><platform><id>5</id><name>PS3</name></platform><url>http://www.gamesradar.com/ps3/tom-clancys-ghost-recon-future-soldier/g-20100210104953504037</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100210104957473031</id><name><us><![CDATA[Tom Clancy's Ghost Recon: Future Soldier]]></us><uk><![CDATA[Tom Clancy's Ghost Recon: Future Soldier]]></uk></name><platform><id>4</id><name>PC</name></platform><url>http://www.gamesradar.com/pc/tom-clancys-ghost-recon-future-soldier/g-20100210104957473031</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100209171039153060</id><name><us><![CDATA[VVVVVV]]></us><uk><![CDATA[VVVVVV]]></uk></name><description><![CDATA[<p>With great puzzly-platforming and music, this downloadable game is truly special. It’s a beautifully made game with lots of challenge, atmosphere, and polish.</p>
|
5
|
+
]]></description><platform><id>4</id><name>PC</name></platform><release_date><us>2010-01-11T00:00:00.00+0000</us><uk>2010-01-11T00:00:00.00+0000</uk></release_date><updated_date>2010-01-11T00:00:00.00+0000</updated_date><score><id>8</id><name>GREAT</name></score><url>http://www.gamesradar.com/pc/vvvvvv/g-20100209171039153060</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/V/VVVVVV/Bulk%20Viewer/PC/2010-02-09/PCG211.rev_vvvvvv.screen08--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010020914361054081</id><name><us><![CDATA[LEGO Star Wars III: The Clone Wars]]></us><uk><![CDATA[LEGO Star Wars III: The Clone Wars]]></uk></name><description><![CDATA[<p>The insanely popular and better-than-bad LEGO Star Wars series returns, this time covering the Clone Wars that were featured in the popular animated series.</p>
|
6
|
+
]]></description><platform><id>9</id><name>DS</name></platform><url>http://www.gamesradar.com/ds/lego-star-wars-iii-the-clone-wars/g-2010020914361054081</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/L/LEGO%20Star%20Wars%20III%20The%20Clone%20Wars/Everything%20Else/Web-Artlowres--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010020914365726014</id><name><us><![CDATA[LEGO Star Wars III: The Clone Wars]]></us><uk><![CDATA[LEGO Star Wars III: The Clone Wars]]></uk></name><description><![CDATA[<p>The insanely popular and better-than-bad LEGO Star Wars series returns, this time covering the Clone Wars that were featured in the popular animated series.</p>
|
7
|
+
]]></description><platform><id>6</id><name>PSP</name></platform><url>http://www.gamesradar.com/psp/lego-star-wars-iii-the-clone-wars/g-2010020914365726014</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/L/LEGO%20Star%20Wars%20III%20The%20Clone%20Wars/Everything%20Else/Web-Artlowres--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100209143542272076</id><name><us><![CDATA[LEGO Star Wars III: The Clone Wars]]></us><uk><![CDATA[LEGO Star Wars III: The Clone Wars]]></uk></name><description><![CDATA[<p>The insanely popular and better-than-bad LEGO Star Wars series returns, this time covering the Clone Wars that were featured in the popular animated series.</p>
|
8
|
+
]]></description><platform><id>7</id><name>Xbox 360</name></platform><url>http://www.gamesradar.com/xbox360/lego-star-wars-iii-the-clone-wars/g-20100209143542272076</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/L/LEGO%20Star%20Wars%20III%20The%20Clone%20Wars/Everything%20Else/Web-Artlowres--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100209143546100060</id><name><us><![CDATA[LEGO Star Wars III: The Clone Wars]]></us><uk><![CDATA[LEGO Star Wars III: The Clone Wars]]></uk></name><description><![CDATA[<p>The insanely popular and better-than-bad LEGO Star Wars series returns, this time covering the Clone Wars that were featured in the popular animated series.</p>
|
9
|
+
]]></description><platform><id>5</id><name>PS3</name></platform><url>http://www.gamesradar.com/ps3/lego-star-wars-iii-the-clone-wars/g-20100209143546100060</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/L/LEGO%20Star%20Wars%20III%20The%20Clone%20Wars/Everything%20Else/Web-Artlowres--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100209143550585073</id><name><us><![CDATA[LEGO Star Wars III: The Clone Wars]]></us><uk><![CDATA[LEGO Star Wars III: The Clone Wars]]></uk></name><description><![CDATA[<p>The insanely popular and better-than-bad LEGO Star Wars series returns, this time covering the Clone Wars that were featured in the popular animated series.</p>
|
10
|
+
]]></description><platform><id>11</id><name>Wii</name></platform><url>http://www.gamesradar.com/wii/lego-star-wars-iii-the-clone-wars/g-20100209143550585073</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/L/LEGO%20Star%20Wars%20III%20The%20Clone%20Wars/Everything%20Else/Web-Artlowres--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100209143557960018</id><name><us><![CDATA[LEGO Star Wars III: The Clone Wars]]></us><uk><![CDATA[LEGO Star Wars III: The Clone Wars]]></uk></name><description><![CDATA[<p>The insanely popular and better-than-bad LEGO Star Wars series returns, this time covering the Clone Wars that were featured in the popular animated series.</p>
|
11
|
+
]]></description><platform><id>4</id><name>PC</name></platform><url>http://www.gamesradar.com/pc/lego-star-wars-iii-the-clone-wars/g-20100209143557960018</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/L/LEGO%20Star%20Wars%20III%20The%20Clone%20Wars/Everything%20Else/Web-Artlowres--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100208171424640064</id><name><us><![CDATA[All Star Karate]]></us><uk><![CDATA[All Star Karate]]></uk></name><platform><id>11</id><name>Wii</name></platform><url>http://www.gamesradar.com/wii/all-star-karate/g-20100208171424640064</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/A/All%20Star%20Karate/Bulk%20Viewers/Wii/2010-02-08/scr260847(1of1)--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>201002041624470076</id><name><us><![CDATA[Naruto Shippuden: Ultimate Ninja Storm 2]]></us><uk><![CDATA[Naruto Shippuden: Ultimate Ninja Storm 2]]></uk></name><description><![CDATA[<p>That's right, Naruto and his group of ninja friends return again. And a first for the Ultimate Ninja series, this one takes place in the Shippuden timeline.</p>
|
12
|
+
]]></description><platform><id>7</id><name>Xbox 360</name></platform><url>http://www.gamesradar.com/xbox360/naruto-shippuden-ultimate-ninja-storm-2/g-201002041624470076</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/N/Naruto%20Shippuden%20Ultimate%20Ninja%20Storm%202/Bulk%20Viewer/PS3%20360/2010-02-04/Battle_with_Kakashi_copie--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>201002041637394087</id><name><us><![CDATA[Naruto Shippuden: Ultimate Ninja Storm 2]]></us><uk><![CDATA[Naruto Shippuden: Ultimate Ninja Storm 2]]></uk></name><description><![CDATA[<p>That's right, Naruto and his group of ninja friends return again. And a first for the Ultimate Ninja series, this one takes place in the Shippuden timeline.</p>
|
13
|
+
]]></description><platform><id>5</id><name>PS3</name></platform><url>http://www.gamesradar.com/ps3/naruto-shippuden-ultimate-ninja-storm-2/g-201002041637394087</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/N/Naruto%20Shippuden%20Ultimate%20Ninja%20Storm%202/Bulk%20Viewer/PS3%20360/2010-02-04/Naruto_face_copie--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010020317293537098</id><name><us><![CDATA[Battle of the Immortals]]></us><uk><![CDATA[Battle of the Immortals]]></uk></name><description><![CDATA[<p>This 2.5D MMO takes characters from many of the world's classic myths and has them battle it out.</p>
|
14
|
+
]]></description><platform><id>4</id><name>PC</name></platform><release_date><us>2010-01-26T00:00:00.00+0000</us><uk>2010-01-26T00:00:00.00+0000</uk></release_date><updated_date>2010-01-26T00:00:00.00+0000</updated_date><url>http://www.gamesradar.com/pc/battle-of-the-immortals/g-2010020317293537098</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/B/Battle%20of%20the%20Immortals/Bulk%20Viewer/PC/2010-02-03/anan4--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010020317443900061</id><name><us><![CDATA[Despicable Me: The Game]]></us><uk><![CDATA[Despicable Me: The Game]]></uk></name><description><![CDATA[<p>Based on the upcoming 3D, animated film featuring the voice of Steve Carell, it focuses on the misadventures of the the no. 1 super villain on the earth.</p>
|
15
|
+
]]></description><platform><id>7</id><name>Xbox 360</name></platform><url>http://www.gamesradar.com/xbox360/despicable-me-the-game/g-2010020317443900061</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010020317526527095</id><name><us><![CDATA[Despicable Me: The Game]]></us><uk><![CDATA[Despicable Me: The Game]]></uk></name><description><![CDATA[<p>Based on the upcoming 3D, animated film featuring the voice of Steve Carell, it focuses on the misadventures of the the no. 1 super villain on the earth.</p>
|
16
|
+
]]></description><platform><id>5</id><name>PS3</name></platform><url>http://www.gamesradar.com/ps3/despicable-me-the-game/g-2010020317526527095</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010020317530793067</id><name><us><![CDATA[Despicable Me: The Game]]></us><uk><![CDATA[Despicable Me: The Game]]></uk></name><description><![CDATA[<p>Based on the upcoming 3D, animated film featuring the voice of Steve Carell, it focuses on the misadventures of the the no. 1 super villain on the earth.</p>
|
17
|
+
]]></description><platform><id>11</id><name>Wii</name></platform><url>http://www.gamesradar.com/wii/despicable-me-the-game/g-2010020317530793067</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010020317535309030</id><name><us><![CDATA[Despicable Me: The Game]]></us><uk><![CDATA[Despicable Me: The Game]]></uk></name><description><![CDATA[<p>Based on the upcoming 3D, animated film featuring the voice of Steve Carell, it focuses on the misadventures of the the no. 1 super villain on the earth.</p>
|
18
|
+
]]></description><platform><id>9</id><name>DS</name></platform><url>http://www.gamesradar.com/ds/despicable-me-the-game/g-2010020317535309030</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010020316374549043</id><name><us><![CDATA[Sumotori Dreams]]></us><uk><![CDATA[Sumotori Dreams]]></uk></name><description><![CDATA[<p>Setting the bots loose in each stage is worth the meagre few bucks the game costs, and unless you’re some sort of demon, it’ll honestly be one of the funniest things you’ll ever see.</p>
|
19
|
+
]]></description><platform><id>4</id><name>PC</name></platform><release_date><us>2009-12-27T00:00:00.00+0000</us><uk>2009-12-27T00:00:00.00+0000</uk></release_date><updated_date>2009-12-27T00:00:00.00+0000</updated_date><score><id>8</id><name>GREAT</name></score><url>http://www.gamesradar.com/pc/sumotori-dreams/g-2010020316374549043</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/S/Sumotori%20Dreams/Bulk%20Viewer/PC/2010-02-03/sumotori--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100203162734822016</id><name><us><![CDATA[After Burner Climax]]></us><uk><![CDATA[After Burner Climax]]></uk></name><platform><id>7</id><name>Xbox 360</name></platform><url>http://www.gamesradar.com/xbox360/after-burner-climax/g-20100203162734822016</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100203162740463071</id><name><us><![CDATA[After Burner Climax]]></us><uk><![CDATA[After Burner Climax]]></uk></name><platform><id>5</id><name>PS3</name></platform><url>http://www.gamesradar.com/ps3/after-burner-climax/g-20100203162740463071</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010020316813835054</id><name><us><![CDATA[Tournament of Legends]]></us><uk><![CDATA[Tournament of Legends]]></uk></name><platform><id>11</id><name>Wii</name></platform><url>http://www.gamesradar.com/wii/tournament-of-legends/g-2010020316813835054</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010020316054501041</id><name><us><![CDATA[Witch's Wish]]></us><uk><![CDATA[Witch's Wish]]></uk></name><platform><id>9</id><name>DS</name></platform><url>http://www.gamesradar.com/ds/witchs-wish/g-2010020316054501041</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010020315495608087</id><name><us><![CDATA[Wings of Prey]]></us><uk><![CDATA[Wings of Prey]]></uk></name><description><![CDATA[<p>WoP is an odd thing – so confident in many ways but flailing for purchase in others. Still, it’s effectively two games in one and, for the sim crowd, it’ll help to stave off the great hunger caused by the now three-year-plus wait for the real Sturmovik sequel, Battle of Britain.</p>
|
20
|
+
]]></description><platform><id>4</id><name>PC</name></platform><release_date><us>2010-01-08T00:00:00.00+0000</us><uk>2010-01-08T00:00:00.00+0000</uk></release_date><updated_date>2010-01-08T00:00:00.00+0000</updated_date><score><id>8</id><name>GREAT</name></score><url>http://www.gamesradar.com/pc/wings-of-prey/g-2010020315495608087</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/W/Wings%20of%20Prey/Bulk%20Viewer/PC/2010-02-03/PCG211.rev_prey.prey1--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100203145720131073</id><name><us><![CDATA[Lead and Gold: Gangs of the Wild West]]></us><uk><![CDATA[Lead and Gold: Gangs of the Wild West]]></uk></name><description><![CDATA[<p>Expect Lead to fill the role of something like Killing Floor in 2010 - simple, dependable multiplayer action that, even with a minimum of depth, delights in shorter sessions, and will rob you of barely a fingernail’s scrape of gold to download.</p>
|
21
|
+
]]></description><platform><id>4</id><name>PC</name></platform><url>http://www.gamesradar.com/pc/lead-and-gold-gangs-of-the-wild-west/g-20100203145720131073</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/L/Lead%20and%20Gold%20Gangs%20of%20the%20Wild%20West/Bulk%20Viewers/PC/2010-02-03/PCG210.pre_lead.lead9--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100203145725162083</id><name><us><![CDATA[Lead and Gold: Gangs of the Wild West]]></us><uk><![CDATA[Lead and Gold: Gangs of the Wild West]]></uk></name><description><![CDATA[<p>Expect Lead to fill the role of something like Killing Floor in 2010 - simple, dependable multiplayer action that, even with a minimum of depth, delights in shorter sessions, and will rob you of barely a fingernail’s scrape of gold to download.</p>
|
22
|
+
]]></description><platform><id>7</id><name>Xbox 360</name></platform><url>http://www.gamesradar.com/xbox360/lead-and-gold-gangs-of-the-wild-west/g-20100203145725162083</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/L/Lead%20and%20Gold%20Gangs%20of%20the%20Wild%20West/Bulk%20Viewers/PC/2010-02-03/leadandgold_greed--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100203145730663064</id><name><us><![CDATA[Lead and Gold: Gangs of the Wild West]]></us><uk><![CDATA[Lead and Gold: Gangs of the Wild West]]></uk></name><description><![CDATA[<p>Expect Lead to fill the role of something like Killing Floor in 2010 - simple, dependable multiplayer action that, even with a minimum of depth, delights in shorter sessions, and will rob you of barely a fingernail’s scrape of gold to download.</p>
|
23
|
+
]]></description><platform><id>5</id><name>PS3</name></platform><url>http://www.gamesradar.com/ps3/lead-and-gold-gangs-of-the-wild-west/g-20100203145730663064</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/L/Lead%20and%20Gold%20Gangs%20of%20the%20Wild%20West/Bulk%20Viewers/PC/2010-02-03/leadandgold_gunslinger_30oct--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010020295742130003</id><name><us><![CDATA[STALKER: Call of Pripyat]]></us><uk><![CDATA[STALKER: Call of Pripyat]]></uk></name><description><![CDATA[<p>Containing the intense atmosphere of the Stalker series, Call of Pripyat is a great game. It’s just sad that, with a bit more effort it could have been the eye-popping classic the series could create.</p>
|
24
|
+
]]></description><platform><id>4</id><name>PC</name></platform><release_date><us>2010-02-02T00:00:00.00+0000</us><uk>2010-02-02T00:00:00.00+0000</uk></release_date><updated_date>2010-02-02T00:00:00.00+0000</updated_date><score><id>8</id><name>GREAT</name></score><url>http://www.gamesradar.com/pc/stalker-call-of-pripyat/g-2010020295742130003</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/S/STALKER%20Call%20of%20Pripyat/Everything%20Else/PCZ218.revpripyat.art3--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100201154937376018</id><name><us><![CDATA[Vanquish]]></us><uk><![CDATA[Vanquish]]></uk></name><platform><id>5</id><name>PS3</name></platform><url>http://www.gamesradar.com/ps3/vanquish/g-20100201154937376018</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100201153929595073</id><name><us><![CDATA[Harvest Moon: Hero of Leaf Valley]]></us><uk><![CDATA[Harvest Moon: Hero of Leaf Valley]]></uk></name><platform><id>6</id><name>PSP</name></platform><url>http://www.gamesradar.com/psp/harvest-moon-hero-of-leaf-valley/g-20100201153929595073</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100201135251267059</id><name><us><![CDATA[Disgaea Infinite]]></us><uk><![CDATA[Disgaea Infinite]]></uk></name><platform><id>6</id><name>PSP</name></platform><url>http://www.gamesradar.com/psp/disgaea-infinite/g-20100201135251267059</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010012817153393006</id><name><us><![CDATA[Mega Man Zero Collection]]></us><uk><![CDATA[Mega Man Zero Collection]]></uk></name><description><![CDATA[<p>Collecting all four of the classic GBA Mega Man Zero games in one affordable package, this is a must for Mega Man fans who missed this great series.</p>
|
25
|
+
]]></description><platform><id>9</id><name>DS</name></platform><url>http://www.gamesradar.com/ds/mega-man-zero-collection/g-2010012817153393006</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/M/Mega%20Man%20Zero%20Collection/Bulk%20Viewer/DS/2010-01-28/Zero_3--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100127161441816074</id><name><us><![CDATA[Alter Ego]]></us><uk><![CDATA[Alter Ego]]></uk></name><description><![CDATA[<p>A creepy adventure game set in the 19th century about solving a sinister mystery in the classic point and click style.</p>
|
26
|
+
]]></description><platform><id>4</id><name>PC</name></platform><url>http://www.gamesradar.com/pc/alter-ego/g-20100127161441816074</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/A/Alter%20Ego/Bulk%20Viewer/PC/2010-01-27/screenshot01--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010012714300637081</id><name><us><![CDATA[FIFA World Cup 2010 South Africa]]></us><uk><![CDATA[FIFA World Cup 2010 South Africa]]></uk></name><description><![CDATA[<p>Clean the grass stains off your jersey and get ready for this new version of FIFA 10 with updated rosters and a big time, World Cup feel.</p>
|
27
|
+
]]></description><platform><id>6</id><name>PSP</name></platform><url>http://www.gamesradar.com/psp/fifa-world-cup-2010-south-africa/g-2010012714300637081</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100127142946762019</id><name><us><![CDATA[FIFA World Cup 2010 South Africa]]></us><uk><![CDATA[FIFA World Cup 2010 South Africa]]></uk></name><description><![CDATA[<p>Clean the grass stains off your jersey and get ready for this new version of FIFA 10 with updated rosters and a big time, World Cup feel.</p>
|
28
|
+
]]></description><platform><id>7</id><name>Xbox 360</name></platform><url>http://www.gamesradar.com/xbox360/fifa-world-cup-2010-south-africa/g-20100127142946762019</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/F/FIFA%20World%20Cup%202010%20South%20Africa/Bulk%20Viewer/360%20PS3/2010-01-27/FIFAWC_Spain_TeamTalk--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100127142950981040</id><name><us><![CDATA[FIFA World Cup 2010 South Africa]]></us><uk><![CDATA[FIFA World Cup 2010 South Africa]]></uk></name><description><![CDATA[<p>Clean the grass stains off your jersey and get ready for this new version of FIFA 10 with updated rosters and a big time, World Cup feel.</p>
|
29
|
+
]]></description><platform><id>5</id><name>PS3</name></platform><url>http://www.gamesradar.com/ps3/fifa-world-cup-2010-south-africa/g-20100127142950981040</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/F/FIFA%20World%20Cup%202010%20South%20Africa/Bulk%20Viewer/360%20PS3/2010-01-27/FIFAWC_Germany_Ballack_Shot--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100127142955497090</id><name><us><![CDATA[FIFA World Cup 2010 South Africa]]></us><uk><![CDATA[FIFA World Cup 2010 South Africa]]></uk></name><description><![CDATA[<p>Clean the grass stains off your jersey and get ready for this new version of FIFA 10 with updated rosters and a big time, World Cup feel.</p>
|
30
|
+
]]></description><platform><id>11</id><name>Wii</name></platform><url>http://www.gamesradar.com/wii/fifa-world-cup-2010-south-africa/g-20100127142955497090</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/empty_01_logo.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100127135220269059</id><name><us><![CDATA[KrissX]]></us><uk><![CDATA[KrissX]]></uk></name><description><![CDATA[<p>Help Wordsworth the Owl solve over 150 stages full of word jumbles in this title that promises simple but addictive puzzle gameplay.</p>
|
31
|
+
]]></description><platform><id>7</id><name>Xbox 360</name></platform><release_date><us>2010-01-27T00:00:00.00+0000</us><uk>2010-01-27T00:00:00.00+0000</uk></release_date><updated_date>2010-01-27T00:00:00.00+0000</updated_date><url>http://www.gamesradar.com/xbox360/krissx/g-20100127135220269059</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/K/KrissX/Bulk%20Viewer/360/2010-01-27/4308283161_d723d6a784_o--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100127111127850001</id><name><us><![CDATA[Kung Foo!]]></us><uk><![CDATA[Kung Foo!]]></uk></name><description><![CDATA[<p>This new family friendly MMO looks like a cute parody of the kung fu movie genre.</p>
|
32
|
+
]]></description><platform><id>4</id><name>PC</name></platform><url>http://www.gamesradar.com/pc/kung-foo/g-20100127111127850001</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/K/Kung%20Foo/Everything%20Else/loligator--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100125151046732082</id><name><us><![CDATA[Let's Draw!]]></us><uk><![CDATA[Let's Draw!]]></uk></name><description><![CDATA[<p>Based on the popular Japanese book series that teaches kids how to draw by combining basic shapes, Let’s Draw! offers a mix of learning and entertainment, with art related minigames and more than 100 objects to draw.</p>
|
33
|
+
]]></description><platform><id>9</id><name>DS</name></platform><url>http://www.gamesradar.com/ds/lets-draw/g-20100125151046732082</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/L/Lets%20Draw/Everything%20Else/elephant-9half--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>2010012512851296084</id><name><us><![CDATA[Viral Survival]]></us><uk><![CDATA[Viral Survival]]></uk></name><description><![CDATA[<p>This fast paced action game for WiiWare focuses on getting DNA from point A to B while dodging the many viruses on the screen.</p>
|
34
|
+
]]></description><platform><id>11</id><name>Wii</name></platform><url>http://www.gamesradar.com/wii/viral-survival/g-2010012512851296084</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/V/Viral%20Survival/Everything%20Else/vs_video--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100121175210809094</id><name><us><![CDATA[Field and Stream: Total Outdoorsman Challenge ]]></us><uk><![CDATA[Field and Stream: Total Outdoorsman Challenge ]]></uk></name><description><![CDATA[<p>Test your marksmanship, tracking abilities, and need to kill animals with no remorse in this new hunting game for the 360.</p>
|
35
|
+
]]></description><platform><id>7</id><name>Xbox 360</name></platform><url>http://www.gamesradar.com/xbox360/field-and-stream-total-outdoorsman-challenge/g-20100121175210809094</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/F/Field%20and%20Stream%20Total%20Outdoorsman%20Challenge/Bulk%20Viewer/360/2010-01-21/192.168.243--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>201001211258559018</id><name><us><![CDATA[Dead or Alive: Paradise]]></us><uk><![CDATA[Dead or Alive: Paradise]]></uk></name><description><![CDATA[<p>Dead or Alive: Paradise ditches the fighting of the earlier games in the series and returns to the sedate, relaxation of Dead or Alive : Xtreme. Loads of voluptuous babes in bikinis playing on the beach in a luxurious tropical resort. With you watching from the bushes.</p>
|
36
|
+
]]></description><platform><id>6</id><name>PSP</name></platform><url>http://www.gamesradar.com/psp/dead-or-alive-paradise/g-201001211258559018</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/D/Dead%20Or%20Alive%20Paradise/Bulk%20Viewer/PSP/2010-01-22/doap_b17--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game><game><id>20100121101924324053</id><name><us><![CDATA[TrackMania Wii]]></us><uk><![CDATA[TrackMania Wii]]></uk></name><description><![CDATA[<p>The beloved community-centered racer comes to the Wii, with tons of tracks and the possibility of infinitely more due to the series' well-known track editor.</p>
|
37
|
+
]]></description><platform><id>11</id><name>Wii</name></platform><url>http://www.gamesradar.com/wii/trackmania-wii/g-20100121101924324053</url><images><thumbnail><![CDATA[http://static.gamesradar.com/images/mb/GamesRadar/us/Games/T/TrackMania%20Wii/Bulk%20Viewers/2010-01-21/Coast--game_thumbnail.jpg]]></thumbnail><box_art><us><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></us><uk><![CDATA[http://static.gamesradar.com/images/mb--game_boxart.jpg]]></uk></box_art></images></game></games>
|
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?><error><code>10001</code><messages><message><![CDATA[RESTRICTED ACCESS: The 'api_key' is invalid.]]></message></messages></error>
|
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?><games xmlns='http://api.gamesradar.com'><total_rows>0</total_rows></games>
|
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?><platforms xmlns='http://api.gamesradar.com'><platform><id>9</id><name>DS</name></platform><platform><id>2005120714112823431396</id><name>Dreamcast</name></platform><platform><id>2005120714112598110961</id><name>GBA</name></platform><platform><id>3</id><name>Game Boy</name></platform><platform><id>8</id><name>GameCube</name></platform><platform><id>14</id><name>Genesis</name></platform><platform><id>2005120714112722229003</id><name>N64</name></platform><platform><id>12</id><name>NES</name></platform><platform><id>4</id><name>PC</name></platform><platform><id>2005120714112685461425</id><name>PS1</name></platform><platform><id>2</id><name>PS2</name></platform><platform><id>5</id><name>PS3</name></platform><platform><id>6</id><name>PSP</name></platform><platform><id>13</id><name>SNES</name></platform><platform><id>15</id><name>Saturn</name></platform><platform><id>1</id><name>Xbox</name></platform><platform><id>7</id><name>Xbox 360</name></platform><platform><id>11</id><name>Wii</name></platform></platforms>
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "test/unit"
|
3
|
+
require "fakeweb"
|
4
|
+
|
5
|
+
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib"
|
6
|
+
|
7
|
+
require "games_radar"
|
8
|
+
|
9
|
+
FakeWeb.allow_net_connect = false
|
10
|
+
|
11
|
+
class Test::Unit::TestCase
|
12
|
+
def resource(path)
|
13
|
+
File.read File.dirname(__FILE__) + "/resources/#{path}"
|
14
|
+
end
|
15
|
+
|
16
|
+
def register_uri(path, options = {})
|
17
|
+
url = File.join(GamesRadar::Request::BASE_URL, path)
|
18
|
+
options = {:body => resource(options)} if options.kind_of?(String)
|
19
|
+
FakeWeb.register_uri(:get, url, options)
|
20
|
+
end
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: games_radar
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nando Vieira
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-02-16 00:00:00 -02:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: nokogiri
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
25
|
+
description: GamesRadar is an API wrapper for the games website http://gamesradar.com
|
26
|
+
email: fnando.vieira@gmail.com
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- README.rdoc
|
33
|
+
files:
|
34
|
+
- CHANGELOG.rdoc
|
35
|
+
- README.rdoc
|
36
|
+
- lib/games-radar.rb
|
37
|
+
- lib/games_radar.rb
|
38
|
+
- lib/games_radar/config.rb
|
39
|
+
- lib/games_radar/errors.rb
|
40
|
+
- lib/games_radar/game.rb
|
41
|
+
- lib/games_radar/genre.rb
|
42
|
+
- lib/games_radar/platform.rb
|
43
|
+
- lib/games_radar/request.rb
|
44
|
+
- lib/games_radar/result.rb
|
45
|
+
- lib/games_radar/version.rb
|
46
|
+
- test/config_test.rb
|
47
|
+
- test/game_test.rb
|
48
|
+
- test/games_radar_test.rb
|
49
|
+
- test/genre_test.rb
|
50
|
+
- test/platform_test.rb
|
51
|
+
- test/request_test.rb
|
52
|
+
- test/resources/game.xml
|
53
|
+
- test/resources/game_not_found.xml
|
54
|
+
- test/resources/games.xml
|
55
|
+
- test/resources/invalid_api_key.xml
|
56
|
+
- test/resources/no_games.xml
|
57
|
+
- test/resources/platforms.xml
|
58
|
+
- test/test_helper.rb
|
59
|
+
has_rdoc: true
|
60
|
+
homepage: http://github.com/fnando/games_radar
|
61
|
+
licenses: []
|
62
|
+
|
63
|
+
post_install_message:
|
64
|
+
rdoc_options:
|
65
|
+
- --charset=UTF-8
|
66
|
+
require_paths:
|
67
|
+
- lib
|
68
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: "0"
|
73
|
+
version:
|
74
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: "0"
|
79
|
+
version:
|
80
|
+
requirements: []
|
81
|
+
|
82
|
+
rubyforge_project:
|
83
|
+
rubygems_version: 1.3.5
|
84
|
+
signing_key:
|
85
|
+
specification_version: 3
|
86
|
+
summary: GamesRadar is an API wrapper for the games website http://gamesradar.com
|
87
|
+
test_files:
|
88
|
+
- test/config_test.rb
|
89
|
+
- test/game_test.rb
|
90
|
+
- test/games_radar_test.rb
|
91
|
+
- test/genre_test.rb
|
92
|
+
- test/platform_test.rb
|
93
|
+
- test/request_test.rb
|
94
|
+
- test/test_helper.rb
|