giant_bomb 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
data/giant_bomb.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{giant_bomb}
8
- s.version = "0.2.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jon Maddox"]
@@ -42,6 +42,10 @@ module GiantBomb
42
42
  @loaded
43
43
  end
44
44
 
45
+ def loaded=(loaded)
46
+ @loaded = loaded
47
+ end
48
+
45
49
  private
46
50
  def decode_raw_attribute(value, type)
47
51
  return nil unless value
@@ -2,8 +2,8 @@ module GiantBomb
2
2
  class Search
3
3
  include HTTParty
4
4
  format :json
5
- # include HTTParty::Icebox
6
- # cache :store => 'file', :timeout => 120, :location => Dir.tmpdir
5
+ include HTTParty::Icebox
6
+ cache :store => 'file', :timeout => 120, :location => Dir.tmpdir
7
7
 
8
8
  base_uri 'api.giantbomb.com'
9
9
 
@@ -32,5 +32,12 @@ module GiantBomb
32
32
  Game.new(response["results"], self)
33
33
  end
34
34
 
35
+ def get_game(game_id)
36
+ response = self.class.get("/game/#{game_id}/", :query => default_query_options)
37
+ game = Game.new(response["results"], self)
38
+ game.loaded = true
39
+ game
40
+ end
41
+
35
42
  end
36
43
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: giant_bomb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Maddox