giantbomb 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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!
@@ -10,5 +10,5 @@ end
10
10
  end
11
11
 
12
12
  module GiantBomb
13
- VERSION = "0.5.1"
13
+ VERSION = "0.5.2"
14
14
  end
@@ -1,6 +1,6 @@
1
1
  module GiantBomb
2
2
  class Character < Resource
3
- has_resource 'character', :plural => 'characters'
3
+ has_resource 'character', :plural => 'characters', :id => '3005'
4
4
 
5
5
  # http://api.giantbomb.com/documentation/#character
6
6
  @@fields = [
@@ -1,6 +1,6 @@
1
1
  module GiantBomb
2
2
  class Company < Resource
3
- has_resource 'company', :plural => 'companies'
3
+ has_resource 'company', :plural => 'companies', :id => '3010'
4
4
 
5
5
  # http://api.giantbomb.com/documentation/#company
6
6
  @@fields = [
@@ -1,6 +1,6 @@
1
1
  module GiantBomb
2
2
  class Concept < Resource
3
- has_resource 'concept', :plural => 'concepts'
3
+ has_resource 'concept', :plural => 'concepts', :id => '3015'
4
4
 
5
5
  # http://api.giantbomb.com/documentation/#concept
6
6
  @@fields = [
@@ -1,6 +1,6 @@
1
1
  module GiantBomb
2
2
  class Franchise < Resource
3
- has_resource 'franchise', :plural => 'franchises'
3
+ has_resource 'franchise', :plural => 'franchises', :id => '3025'
4
4
 
5
5
  # http://api.giantbomb.com/documentation/#franchise
6
6
  @@fields = [
@@ -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.
@@ -1,6 +1,6 @@
1
1
  module GiantBomb
2
2
  class Location < Resource
3
- has_resource 'location', :plural => 'locations'
3
+ has_resource 'location', :plural => 'locations', :id => '3035'
4
4
 
5
5
  # http://api.giantbomb.com/documentation/#location
6
6
  @@fields = [
@@ -1,6 +1,6 @@
1
1
  module GiantBomb
2
2
  class GameObject < Resource
3
- has_resource 'object', :plural => 'objects'
3
+ has_resource 'object', :plural => 'objects', :id => '3055'
4
4
 
5
5
  # http://api.giantbomb.com/documentation/#object
6
6
  @@fields = [
@@ -1,6 +1,6 @@
1
1
  module GiantBomb
2
2
  class Person < Resource
3
- has_resource 'person', :plural => 'people'
3
+ has_resource 'person', :plural => 'people', :id => '3040'
4
4
 
5
5
  # http://api.giantbomb.com/documentation/#person
6
6
  @@fields = [
@@ -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
@@ -1,6 +1,6 @@
1
1
  module GiantBomb
2
2
  class Video < Resource
3
- has_resource 'video', :plural => 'videos'
3
+ has_resource 'video', :plural => 'videos', :id => '2300'
4
4
 
5
5
  # http://api.giantbomb.com/documentation/#video
6
6
  @@fields = [
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
- version: 0.5.1
5
- prerelease:
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
- date: 2012-09-08 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
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
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
30
- description: Provides a simple, easy to use interface for the Giant Bomb video game
31
- wiki API.
32
- email:
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
- files:
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
- require_paths:
67
+
68
+ require_paths:
61
69
  - lib
62
- required_ruby_version: !ruby/object:Gem::Requirement
63
- none: false
64
- requirements:
65
- - - ! '>='
66
- - !ruby/object:Gem::Version
67
- version: '0'
68
- required_rubygems_version: !ruby/object:Gem::Requirement
69
- none: false
70
- requirements:
71
- - - ! '>='
72
- - !ruby/object:Gem::Version
73
- version: '0'
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.8.24
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
- has_rdoc:
92
+