battlenet-api 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34bead009ea53df329c024cbc2dbc72be58a4b80
4
- data.tar.gz: 80b7435404b703cd9af0fea335a657643e13104d
3
+ metadata.gz: d94d64ac8a17ab60791a9866ce0a6931da5fa830
4
+ data.tar.gz: 276fb263625a13ee0bc8e817de74764ed343f18f
5
5
  SHA512:
6
- metadata.gz: d4d97c3587a13095ce282fff907632a5f4a01cff3349ec84d133a51e7a3269cf9f1911cd0af44e63a2842888a517c7e97bab182eaf6590e609fdaa15d8d12b68
7
- data.tar.gz: 0123d7ef4845882db8083219e61db3e5dc5e194c6b4a9379116917543d544a734671a88619292d742c6996646bb351c09e3e48ca14aebd2433bc2298832ba1a2
6
+ metadata.gz: e8d39c4264f3b883cd17594bbdba711ce268191c714c97c47e925fb3e55d97077f76494f9eaca6fdad343c0f66396ef19374edf792a4e49a8541703dc5c701de
7
+ data.tar.gz: 6d2bb6ea3f5b49229c396daa233d30855fcd0c3aef22e5fd7757331a0eed4844817a2d59e3245170aa25a5aa29403502b6278d17c2acceb3f9ea595aecf3601d
@@ -1,5 +1,5 @@
1
1
  module Battlenet
2
2
  module Api
3
- VERSION = "1.0.3"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -15,6 +15,8 @@ require 'battlenet/modules/wow/data'
15
15
  require 'battlenet/modules/wow/challenge'
16
16
  require 'battlenet/modules/wow/mount'
17
17
  require 'battlenet/modules/wow/pet'
18
+ require 'battlenet/modules/wow/boss'
19
+ require 'battlenet/modules/wow/zone'
18
20
 
19
21
  module Battlenet
20
22
 
@@ -87,6 +89,14 @@ module Battlenet
87
89
  merge_options_and_return_obj(options, Battlenet::WOW::Pet)
88
90
  end
89
91
 
92
+ def boss(options = {})
93
+ merge_options_and_return_obj(options, Battlenet::WOW::Boss)
94
+ end
95
+
96
+ def zone(options = {})
97
+ merge_options_and_return_obj(options, Battlenet::WOW::Zone)
98
+ end
99
+
90
100
  private
91
101
 
92
102
  def merge_options_and_return_obj(options, obj)
@@ -0,0 +1,20 @@
1
+ module Battlenet
2
+ module WOW
3
+ class Boss < Battlenet::APIResponse
4
+
5
+ def initialize(options={})
6
+ @endpoint = "/boss"
7
+ super(options)
8
+ end
9
+
10
+ def master_list(options = {})
11
+ get_data("#{@endpoint}", options)
12
+ end
13
+
14
+ def details(id, options = {})
15
+ get_data("#{@endpoint}/#{id}", options)
16
+ end
17
+
18
+ end
19
+ end
20
+ end
@@ -50,6 +50,10 @@ module Battlenet
50
50
  get_data(@endpoint, options.merge({fields: 'petSlots'}))
51
51
  end
52
52
 
53
+ def professions(options = {})
54
+ get_data(@endpoint, options.merge({fields: 'professions'}))
55
+ end
56
+
53
57
  def progression(options = {})
54
58
  get_data(@endpoint, options.merge({fields: 'progression'}))
55
59
  end
@@ -0,0 +1,20 @@
1
+ module Battlenet
2
+ module WOW
3
+ class Zone < Battlenet::APIResponse
4
+
5
+ def initialize(options={})
6
+ @endpoint = "/zone"
7
+ super(options)
8
+ end
9
+
10
+ def master_list(options = {})
11
+ get_data("#{@endpoint}", options)
12
+ end
13
+
14
+ def details(id, options = {})
15
+ get_data("#{@endpoint}/#{id}", options)
16
+ end
17
+
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+
3
+ describe Battlenet::WOW::Boss do
4
+
5
+ it { should respond_to(:master_list) }
6
+ it { should respond_to(:details) }
7
+
8
+ end
@@ -23,6 +23,7 @@ describe Battlenet::WOW::Character do
23
23
  it { should respond_to(:mounts) }
24
24
  it { should respond_to(:pet_slots) }
25
25
  it { should respond_to(:progression) }
26
+ it { should respond_to(:professions) }
26
27
  it { should respond_to(:pvp) }
27
28
  it { should respond_to(:quests) }
28
29
  it { should respond_to(:reputation) }
@@ -10,15 +10,6 @@ describe Battlenet::WOW::Pet do
10
10
  end
11
11
  @wow_client = Battlenet.WOWClient
12
12
  end
13
-
14
- it "should be able to fetch details" do
15
- sid = 1134
16
- VCR.use_cassette("pet/species/#{sid}") do
17
- species = @wow_client.pet.species(sid)
18
- expect(species['speciesId']).to eq(sid)
19
- expect(species).to have_key('abilities')
20
- end
21
- end
22
13
  end
23
14
 
24
15
  it { should respond_to(:master_list) }
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+
3
+ describe Battlenet::WOW::Zone do
4
+
5
+ it { should respond_to(:master_list) }
6
+ it { should respond_to(:details) }
7
+
8
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: battlenet-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - goodcodeguy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-06 00:00:00.000000000 Z
11
+ date: 2017-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -166,6 +166,7 @@ files:
166
166
  - lib/battlenet/modules/sc2/profile.rb
167
167
  - lib/battlenet/modules/wow/achievement.rb
168
168
  - lib/battlenet/modules/wow/auction.rb
169
+ - lib/battlenet/modules/wow/boss.rb
169
170
  - lib/battlenet/modules/wow/challenge.rb
170
171
  - lib/battlenet/modules/wow/character.rb
171
172
  - lib/battlenet/modules/wow/data.rb
@@ -179,6 +180,7 @@ files:
179
180
  - lib/battlenet/modules/wow/realm.rb
180
181
  - lib/battlenet/modules/wow/recipe.rb
181
182
  - lib/battlenet/modules/wow/spell.rb
183
+ - lib/battlenet/modules/wow/zone.rb
182
184
  - spec/battlenetapi_spec.rb
183
185
  - spec/client_spec.rb
184
186
  - spec/d3/data_spec.rb
@@ -191,6 +193,7 @@ files:
191
193
  - spec/spec_helper.rb
192
194
  - spec/wow/achievement_spec.rb
193
195
  - spec/wow/auction_spec.rb
196
+ - spec/wow/boss_spec.rb
194
197
  - spec/wow/challenge_spec.rb
195
198
  - spec/wow/character_spec.rb
196
199
  - spec/wow/data_spec.rb
@@ -204,6 +207,7 @@ files:
204
207
  - spec/wow/realm_spec.rb
205
208
  - spec/wow/recipe_spec.rb
206
209
  - spec/wow/spell_spec.rb
210
+ - spec/wow/zone_spec.rb
207
211
  - spec/wowclient_spec.rb
208
212
  homepage: https://github.com/goodcodeguy/battlenet-api
209
213
  licenses:
@@ -225,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
229
  version: '0'
226
230
  requirements: []
227
231
  rubyforge_project:
228
- rubygems_version: 2.5.1
232
+ rubygems_version: 2.6.13
229
233
  signing_key:
230
234
  specification_version: 4
231
235
  summary: Battlenet Client API
@@ -242,6 +246,7 @@ test_files:
242
246
  - spec/spec_helper.rb
243
247
  - spec/wow/achievement_spec.rb
244
248
  - spec/wow/auction_spec.rb
249
+ - spec/wow/boss_spec.rb
245
250
  - spec/wow/challenge_spec.rb
246
251
  - spec/wow/character_spec.rb
247
252
  - spec/wow/data_spec.rb
@@ -255,4 +260,5 @@ test_files:
255
260
  - spec/wow/realm_spec.rb
256
261
  - spec/wow/recipe_spec.rb
257
262
  - spec/wow/spell_spec.rb
263
+ - spec/wow/zone_spec.rb
258
264
  - spec/wowclient_spec.rb