giantbomb 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +20 -0
- data/lib/giantbomb.rb +1 -1
- data/lib/giantbomb/character.rb +1 -1
- data/lib/giantbomb/company.rb +1 -1
- data/lib/giantbomb/concept.rb +1 -1
- data/lib/giantbomb/franchise.rb +1 -1
- data/lib/giantbomb/game.rb +2 -1
- data/lib/giantbomb/location.rb +1 -1
- data/lib/giantbomb/object.rb +1 -1
- data/lib/giantbomb/person.rb +1 -1
- data/lib/giantbomb/resource.rb +7 -1
- data/lib/giantbomb/video.rb +1 -1
- metadata +51 -40
data/Gemfile.lock
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
giantbomb (0.5.1)
|
5
|
+
httparty
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
httparty (0.10.2)
|
11
|
+
multi_json (~> 1.0)
|
12
|
+
multi_xml (>= 0.5.2)
|
13
|
+
multi_json (1.6.1)
|
14
|
+
multi_xml (0.5.3)
|
15
|
+
|
16
|
+
PLATFORMS
|
17
|
+
ruby
|
18
|
+
|
19
|
+
DEPENDENCIES
|
20
|
+
giantbomb!
|
data/lib/giantbomb.rb
CHANGED
data/lib/giantbomb/character.rb
CHANGED
data/lib/giantbomb/company.rb
CHANGED
data/lib/giantbomb/concept.rb
CHANGED
data/lib/giantbomb/franchise.rb
CHANGED
data/lib/giantbomb/game.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module GiantBomb
|
2
2
|
class Game < Resource
|
3
|
-
has_resource 'game', :plural => 'games'
|
3
|
+
has_resource 'game', :plural => 'games', :id => '3030'
|
4
4
|
|
5
5
|
# http://api.giantbomb.com/documentation/#game
|
6
6
|
@@fields = [
|
@@ -13,6 +13,7 @@ module GiantBomb
|
|
13
13
|
:deck, # Brief summary of the game
|
14
14
|
:description, # Description of the game
|
15
15
|
:developers, # Companies that developed the game
|
16
|
+
:expected_release_day, # Expected day the game will be released in. The day is represented numerically.
|
16
17
|
:expected_release_month, # Expected month the game will be released in. The month is represented numerically.
|
17
18
|
:expected_release_quarter, # Expected quarter game will be released in. The quarter is represented numerically, where 1 = Q1, 2 = Q2, 3 = Q3, and 4 = Q4.
|
18
19
|
:expected_release_year, # Expected year the game will be released in.
|
data/lib/giantbomb/location.rb
CHANGED
data/lib/giantbomb/object.rb
CHANGED
data/lib/giantbomb/person.rb
CHANGED
data/lib/giantbomb/resource.rb
CHANGED
@@ -1,20 +1,26 @@
|
|
1
1
|
module GiantBomb
|
2
2
|
class Resource
|
3
3
|
@@endpoints = {}
|
4
|
+
@@endpoint_id = {}
|
4
5
|
|
5
6
|
def self.has_resource(singular=nil, opts={})
|
6
7
|
@@endpoints[self.name.downcase] = {
|
7
8
|
:singular => singular.nil? ? "#{self.name.downcase}" : singular,
|
8
9
|
:plural => opts[:plural].nil? ? "#{self.name.downcase}s" : opts[:plural]
|
9
10
|
}
|
11
|
+
@@endpoint_id[self.name.downcase] = opts[:id].nil? ? "" : "#{opts[:id]}-"
|
10
12
|
end
|
11
13
|
|
12
14
|
def self.endpoints
|
13
15
|
@@endpoints[self.name.downcase]
|
14
16
|
end
|
17
|
+
|
18
|
+
def self.endpoint_id
|
19
|
+
@@endpoint_id[self.name.downcase]
|
20
|
+
end
|
15
21
|
|
16
22
|
def self.detail(id, conditions={})
|
17
|
-
search = GiantBomb::Search.new("/#{self.endpoints[:singular]}/#{id}/")
|
23
|
+
search = GiantBomb::Search.new("/#{self.endpoints[:singular]}/#{self.endpoint_id + id.to_s}/")
|
18
24
|
search.filter(conditions)
|
19
25
|
self.new(search.fetch)
|
20
26
|
end
|
data/lib/giantbomb/video.rb
CHANGED
metadata
CHANGED
@@ -1,42 +1,47 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: giantbomb
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 5
|
8
|
+
- 2
|
9
|
+
version: 0.5.2
|
6
10
|
platform: ruby
|
7
|
-
authors:
|
11
|
+
authors:
|
8
12
|
- Robert Coker
|
9
13
|
autorequire:
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
|
17
|
+
date: 2013-02-26 00:00:00 -05:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: httparty
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :runtime
|
23
22
|
prerelease: false
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
version: "0"
|
30
|
+
type: :runtime
|
31
|
+
version_requirements: *id001
|
32
|
+
description: Provides a simple, easy to use interface for the Giant Bomb video game wiki API.
|
33
|
+
email:
|
33
34
|
- rob@robertsays.com
|
34
35
|
executables: []
|
36
|
+
|
35
37
|
extensions: []
|
38
|
+
|
36
39
|
extra_rdoc_files: []
|
37
|
-
|
40
|
+
|
41
|
+
files:
|
38
42
|
- .gitignore
|
39
43
|
- Gemfile
|
44
|
+
- Gemfile.lock
|
40
45
|
- README.textile
|
41
46
|
- Rakefile
|
42
47
|
- giantbomb.gemspec
|
@@ -53,29 +58,35 @@ files:
|
|
53
58
|
- lib/giantbomb/resource.rb
|
54
59
|
- lib/giantbomb/search.rb
|
55
60
|
- lib/giantbomb/video.rb
|
61
|
+
has_rdoc: true
|
56
62
|
homepage: http://rubygems.org/gems/giantbomb
|
57
63
|
licenses: []
|
64
|
+
|
58
65
|
post_install_message:
|
59
66
|
rdoc_options: []
|
60
|
-
|
67
|
+
|
68
|
+
require_paths:
|
61
69
|
- lib
|
62
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
requirements:
|
71
|
-
- -
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
segments:
|
82
|
+
- 0
|
83
|
+
version: "0"
|
74
84
|
requirements: []
|
85
|
+
|
75
86
|
rubyforge_project: giantbomb
|
76
|
-
rubygems_version: 1.
|
87
|
+
rubygems_version: 1.3.6
|
77
88
|
signing_key:
|
78
89
|
specification_version: 3
|
79
90
|
summary: A Ruby wrapper for the Giant Bomb video game wiki API.
|
80
91
|
test_files: []
|
81
|
-
|
92
|
+
|