bnet_api 0.1.5 → 1.0.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.
@@ -1,29 +1,29 @@
1
- require 'spec_helper'
2
-
3
- describe BnetApi::WoW do
4
-
5
- before :each do
6
- BnetApi.configure do |config|
7
- config.api_key = ENV['BNET_API_KEY']
8
- config.api_secret = ENV['BNET_API_SECRET']
9
- end
10
- end
11
-
12
- it "gets an item from the API" do
13
- item = BnetApi::WoW.item(18803)
14
-
15
- expect(item['id']).to eq 18803
16
- expect(item['disenchantingSkillRank']).to eq 225
17
- expect(item['name']).to eq 'Finkle\'s Lava Dredger'
18
- expect(item['icon']).to eq 'inv_gizmo_02'
19
- end
20
-
21
- it "gets an item set from the API" do
22
- item_set = BnetApi::WoW.item_set(1060)
23
-
24
- expect(item_set['id']).to eq 1060
25
- expect(item_set['name']).to eq 'Deep Earth Vestments'
26
- expect(item_set['setBonuses']).not_to be_nil
27
- expect(item_set['items']).not_to be_nil
28
- end
1
+ require 'spec_helper'
2
+
3
+ describe BnetApi::WoW do
4
+
5
+ before :each do
6
+ BnetApi.configure do |config|
7
+ config.api_key = ENV['BNET_API_KEY']
8
+ config.api_secret = ENV['BNET_API_SECRET']
9
+ end
10
+ end
11
+
12
+ it "gets an item from the API" do
13
+ item = BnetApi::WoW.item(18803)
14
+
15
+ expect(item['id']).to eq 18803
16
+ expect(item['disenchantingSkillRank']).to eq 225
17
+ expect(item['name']).to eq 'Finkle\'s Lava Dredger'
18
+ expect(item['icon']).to eq 'inv_gizmo_02'
19
+ end
20
+
21
+ it "gets an item set from the API" do
22
+ item_set = BnetApi::WoW.item_set(1060)
23
+
24
+ expect(item_set['id']).to eq 1060
25
+ expect(item_set['name']).to eq 'Deep Earth Vestments'
26
+ expect(item_set['setBonuses']).not_to be_nil
27
+ expect(item_set['items']).not_to be_nil
28
+ end
29
29
  end
@@ -1,50 +1,56 @@
1
- require 'spec_helper'
2
-
3
- describe BnetApi::WoW do
4
-
5
- before :each do
6
- BnetApi.configure do |config|
7
- config.api_key = ENV['BNET_API_KEY']
8
- config.api_secret = ENV['BNET_API_SECRET']
9
- end
10
- end
11
-
12
- it "gets a battlepet ability from the API" do
13
- ability = BnetApi::WoW.battlepet_ability(640)
14
-
15
- expect(ability['id']).to eq 640
16
- expect(ability['name']).to eq 'Toxic Smoke'
17
- expect(ability['icon']).to eq 'spell_shadow_plaguecloud'
18
- expect(ability['cooldown']).to eq 0
19
- expect(ability['rounds']).to eq 1
20
- expect(ability['petTypeId']).to eq 9
21
- expect(ability['isPassive']).to eq false
22
- expect(ability['hideHints']).to eq false
23
- end
24
-
25
- it "gets a battlepet species from the API" do
26
- species = BnetApi::WoW.battlepet_species(258)
27
-
28
- expect(species['speciesId']).to eq 258
29
- expect(species['petTypeId']).to eq 9
30
- expect(species['creatureId']).to eq 42078
31
- expect(species['name']).to eq 'Mini Thor'
32
- expect(species['canBattle']).to eq true
33
- expect(species['icon']).to eq 't_roboticon'
34
- expect(species['description']).not_to be_nil
35
- expect(species['source']).not_to be_nil
36
- expect(species['abilities']).not_to be_nil
37
- end
38
-
39
- it "gets battlepet stats data from the API" do
40
- stats = BnetApi::WoW.battlepet_stats(258, level: 25, breedId: 5, qualityId: 4)
41
-
42
- expect(stats['speciesId']).to eq 258
43
- expect(stats['breedId']).to eq 5
44
- expect(stats['petQualityId']).to eq 4
45
- expect(stats['level']).to eq 25
46
- expect(stats['health']).to eq 1587
47
- expect(stats['power']).to eq 315
48
- expect(stats['speed']).to eq 297
49
- end
1
+ require 'spec_helper'
2
+
3
+ describe BnetApi::WoW do
4
+
5
+ before :each do
6
+ BnetApi.configure do |config|
7
+ config.api_key = ENV['BNET_API_KEY']
8
+ config.api_secret = ENV['BNET_API_SECRET']
9
+ end
10
+ end
11
+
12
+ it "gets a list of all pets from the api" do
13
+ master_list = BnetApi::WoW.pet_master_list
14
+
15
+ expect(master_list['pets']).not_to be_nil
16
+ end
17
+
18
+ it "gets a pet ability from the API" do
19
+ ability = BnetApi::WoW.pet_ability(640)
20
+
21
+ expect(ability['id']).to eq 640
22
+ expect(ability['name']).to eq 'Toxic Smoke'
23
+ expect(ability['icon']).to eq 'spell_shadow_plaguecloud'
24
+ expect(ability['cooldown']).to eq 0
25
+ expect(ability['rounds']).to eq 1
26
+ expect(ability['petTypeId']).to eq 9
27
+ expect(ability['isPassive']).to eq false
28
+ expect(ability['hideHints']).to eq false
29
+ end
30
+
31
+ it "gets a pet species from the API" do
32
+ species = BnetApi::WoW.pet_species(258)
33
+
34
+ expect(species['speciesId']).to eq 258
35
+ expect(species['petTypeId']).to eq 9
36
+ expect(species['creatureId']).to eq 42078
37
+ expect(species['name']).to eq 'Mini Thor'
38
+ expect(species['canBattle']).to eq true
39
+ expect(species['icon']).to eq 't_roboticon'
40
+ expect(species['description']).not_to be_nil
41
+ expect(species['source']).not_to be_nil
42
+ expect(species['abilities']).not_to be_nil
43
+ end
44
+
45
+ it "gets pet stats data from the API" do
46
+ stats = BnetApi::WoW.pet_stats(258, level: 25, breedId: 5, qualityId: 4)
47
+
48
+ expect(stats['speciesId']).to eq 258
49
+ expect(stats['breedId']).to eq 5
50
+ expect(stats['petQualityId']).to eq 4
51
+ expect(stats['level']).to eq 25
52
+ expect(stats['health']).to eq 1587
53
+ expect(stats['power']).to eq 315
54
+ expect(stats['speed']).to eq 297
55
+ end
50
56
  end
@@ -1,17 +1,17 @@
1
- require 'spec_helper'
2
-
3
- describe BnetApi::WoW do
4
-
5
- before :each do
6
- BnetApi.configure do |config|
7
- config.api_key = ENV['BNET_API_KEY']
8
- config.api_secret = ENV['BNET_API_SECRET']
9
- end
10
- end
11
-
12
- it "gets a pvp leaderboard from the API" do
13
- leaderboard = BnetApi::WoW.pvp('2v2')
14
-
15
- expect(leaderboard['rows']).not_to be_nil
16
- end
1
+ require 'spec_helper'
2
+
3
+ describe BnetApi::WoW do
4
+
5
+ before :each do
6
+ BnetApi.configure do |config|
7
+ config.api_key = ENV['BNET_API_KEY']
8
+ config.api_secret = ENV['BNET_API_SECRET']
9
+ end
10
+ end
11
+
12
+ it "gets a pvp leaderboard from the API" do
13
+ leaderboard = BnetApi::WoW.pvp('2v2')
14
+
15
+ expect(leaderboard['rows']).not_to be_nil
16
+ end
17
17
  end
@@ -1,22 +1,22 @@
1
- require 'spec_helper'
2
-
3
- describe BnetApi::WoW do
4
-
5
- before :each do
6
- BnetApi.configure do |config|
7
- config.api_key = ENV['BNET_API_KEY']
8
- config.api_secret = ENV['BNET_API_SECRET']
9
- end
10
- end
11
-
12
- it "gets a quest from the API" do
13
- quest = BnetApi::WoW.quest(13146)
14
-
15
- expect(quest['id']).to eq 13146
16
- expect(quest['title']).to eq 'Generosity Abounds'
17
- expect(quest['reqLevel']).to eq 77
18
- expect(quest['suggestedPartyMembers']).to eq 0
19
- expect(quest['category']).to eq 'Icecrown'
20
- expect(quest['level']).to eq 80
21
- end
1
+ require 'spec_helper'
2
+
3
+ describe BnetApi::WoW do
4
+
5
+ before :each do
6
+ BnetApi.configure do |config|
7
+ config.api_key = ENV['BNET_API_KEY']
8
+ config.api_secret = ENV['BNET_API_SECRET']
9
+ end
10
+ end
11
+
12
+ it "gets a quest from the API" do
13
+ quest = BnetApi::WoW.quest(13146)
14
+
15
+ expect(quest['id']).to eq 13146
16
+ expect(quest['title']).to eq 'Generosity Abounds'
17
+ expect(quest['reqLevel']).to eq 77
18
+ expect(quest['suggestedPartyMembers']).to eq 0
19
+ expect(quest['category']).to eq 'Icecrown'
20
+ expect(quest['level']).to eq 80
21
+ end
22
22
  end
@@ -1,25 +1,25 @@
1
- require 'spec_helper'
2
-
3
- describe BnetApi::WoW do
4
-
5
- before :each do
6
- BnetApi.configure do |config|
7
- config.api_key = ENV['BNET_API_KEY']
8
- config.api_secret = ENV['BNET_API_SECRET']
9
- end
10
- end
11
-
12
- it "gets realm status data from the API" do
13
- realm_status = BnetApi::WoW.realm_status
14
-
15
- expect(realm_status['realms']).not_to be_nil
16
- end
17
-
18
- it "gets realm status data for specified realms from the API" do
19
- realm_status = BnetApi::WoW.realm_status('Thunderhorn')
20
-
21
- expect(realm_status['realms']).not_to be_nil
22
- expect(realm_status['realms'].count).to eq 1
23
- expect(realm_status['realms'][0]['name']).to eq 'Thunderhorn'
24
- end
1
+ require 'spec_helper'
2
+
3
+ describe BnetApi::WoW do
4
+
5
+ before :each do
6
+ BnetApi.configure do |config|
7
+ config.api_key = ENV['BNET_API_KEY']
8
+ config.api_secret = ENV['BNET_API_SECRET']
9
+ end
10
+ end
11
+
12
+ it "gets realm status data from the API" do
13
+ realm_status = BnetApi::WoW.realm_status
14
+
15
+ expect(realm_status['realms']).not_to be_nil
16
+ end
17
+
18
+ it "gets realm status data for specified realms from the API" do
19
+ realm_status = BnetApi::WoW.realm_status('Thunderhorn')
20
+
21
+ expect(realm_status['realms']).not_to be_nil
22
+ expect(realm_status['realms'].count).to eq 1
23
+ expect(realm_status['realms'][0]['name']).to eq 'Thunderhorn'
24
+ end
25
25
  end
@@ -1,20 +1,20 @@
1
- require 'spec_helper'
2
-
3
- describe BnetApi::WoW do
4
-
5
- before :each do
6
- BnetApi.configure do |config|
7
- config.api_key = ENV['BNET_API_KEY']
8
- config.api_secret = ENV['BNET_API_SECRET']
9
- end
10
- end
11
-
12
- it "gets a recipe from the API" do
13
- recipe = BnetApi::WoW.recipe(33994)
14
-
15
- expect(recipe['id']).to eq 33994
16
- expect(recipe['name']).to eq 'Precise Strikes'
17
- expect(recipe['profession']).to eq 'Enchanting'
18
- expect(recipe['icon']).to eq 'spell_holy_greaterheal'
19
- end
1
+ require 'spec_helper'
2
+
3
+ describe BnetApi::WoW do
4
+
5
+ before :each do
6
+ BnetApi.configure do |config|
7
+ config.api_key = ENV['BNET_API_KEY']
8
+ config.api_secret = ENV['BNET_API_SECRET']
9
+ end
10
+ end
11
+
12
+ it "gets a recipe from the API" do
13
+ recipe = BnetApi::WoW.recipe(33994)
14
+
15
+ expect(recipe['id']).to eq 33994
16
+ expect(recipe['name']).to eq 'Precise Strikes'
17
+ expect(recipe['profession']).to eq 'Enchanting'
18
+ expect(recipe['icon']).to eq 'spell_holy_greaterheal'
19
+ end
20
20
  end
@@ -1,24 +1,24 @@
1
- require 'spec_helper'
2
-
3
- describe BnetApi::WoW do
4
-
5
- before :each do
6
- BnetApi.configure do |config|
7
- config.api_key = ENV['BNET_API_KEY']
8
- config.api_secret = ENV['BNET_API_SECRET']
9
- end
10
- end
11
-
12
- it "gets a spell from the API" do
13
- spell = BnetApi::WoW.spell(8056)
14
-
15
- expect(spell['id']).to eq 8056
16
- expect(spell['name']).to eq 'Frost Shock'
17
- expect(spell['icon']).to eq 'spell_frost_frostshock'
18
- expect(spell['description']).not_to be_nil
19
- expect(spell['range']).to eq '25 yd range'
20
- expect(spell['powerCost']).to eq '1.25% of base mana'
21
- expect(spell['castTime']).to eq 'Instant'
22
- expect(spell['cooldown']).to eq '6 sec cooldown'
23
- end
1
+ require 'spec_helper'
2
+
3
+ describe BnetApi::WoW do
4
+
5
+ before :each do
6
+ BnetApi.configure do |config|
7
+ config.api_key = ENV['BNET_API_KEY']
8
+ config.api_secret = ENV['BNET_API_SECRET']
9
+ end
10
+ end
11
+
12
+ it "gets a spell from the API" do
13
+ spell = BnetApi::WoW.spell(8056)
14
+
15
+ expect(spell['id']).to eq 8056
16
+ expect(spell['name']).to eq 'zzOldFrost Shock'
17
+ expect(spell['icon']).to eq 'spell_frost_frostshock'
18
+ expect(spell['description']).not_to be_nil
19
+ expect(spell['range']).to eq '25 yd range'
20
+ expect(spell['powerCost']).to eq '1.25% of base mana'
21
+ expect(spell['castTime']).to eq 'Instant'
22
+ expect(spell['cooldown']).to eq '6 sec cooldown'
23
+ end
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bnet_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Connolly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-09 00:00:00.000000000 Z
11
+ date: 2016-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -16,42 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.13.3
19
+ version: 0.14.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.13.3
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ! '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ! '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ! '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
26
+ version: 0.14.0
55
27
  description: Ruby wrapper for the Battle.net web API. For more info visit https://dev.battle.net
56
28
  email:
57
29
  - tconnolly1991@gmail.com
@@ -59,10 +31,9 @@ executables: []
59
31
  extensions: []
60
32
  extra_rdoc_files: []
61
33
  files:
62
- - .gitignore
63
- - .rspec
64
- - .travis.yml
65
- - .yardopts
34
+ - ".gitignore"
35
+ - ".travis.yml"
36
+ - ".yardopts"
66
37
  - CHANGELOG.md
67
38
  - Gemfile
68
39
  - LICENSE.md
@@ -82,12 +53,12 @@ files:
82
53
  - spec/bnet_api/sc2_spec.rb
83
54
  - spec/bnet_api/wow/wow_achievement_spec.rb
84
55
  - spec/bnet_api/wow/wow_auction_data_spec.rb
85
- - spec/bnet_api/wow/wow_battlepet_spec.rb
86
56
  - spec/bnet_api/wow/wow_challenge_mode_spec.rb
87
57
  - spec/bnet_api/wow/wow_character_spec.rb
88
58
  - spec/bnet_api/wow/wow_data_spec.rb
89
59
  - spec/bnet_api/wow/wow_guild_spec.rb
90
60
  - spec/bnet_api/wow/wow_item_spec.rb
61
+ - spec/bnet_api/wow/wow_pet_spec.rb
91
62
  - spec/bnet_api/wow/wow_pvp_spec.rb
92
63
  - spec/bnet_api/wow/wow_quest_spec.rb
93
64
  - spec/bnet_api/wow/wow_realm_status_spec.rb
@@ -104,17 +75,17 @@ require_paths:
104
75
  - lib
105
76
  required_ruby_version: !ruby/object:Gem::Requirement
106
77
  requirements:
107
- - - ! '>='
78
+ - - ">="
108
79
  - !ruby/object:Gem::Version
109
- version: '0'
80
+ version: 2.0.0
110
81
  required_rubygems_version: !ruby/object:Gem::Requirement
111
82
  requirements:
112
- - - ! '>='
83
+ - - ">="
113
84
  - !ruby/object:Gem::Version
114
85
  version: '0'
115
86
  requirements: []
116
87
  rubyforge_project:
117
- rubygems_version: 2.4.5
88
+ rubygems_version: 2.5.1
118
89
  signing_key:
119
90
  specification_version: 4
120
91
  summary: Ruby wrapper for the Battle.net web API.
@@ -125,16 +96,15 @@ test_files:
125
96
  - spec/bnet_api/sc2_spec.rb
126
97
  - spec/bnet_api/wow/wow_achievement_spec.rb
127
98
  - spec/bnet_api/wow/wow_auction_data_spec.rb
128
- - spec/bnet_api/wow/wow_battlepet_spec.rb
129
99
  - spec/bnet_api/wow/wow_challenge_mode_spec.rb
130
100
  - spec/bnet_api/wow/wow_character_spec.rb
131
101
  - spec/bnet_api/wow/wow_data_spec.rb
132
102
  - spec/bnet_api/wow/wow_guild_spec.rb
133
103
  - spec/bnet_api/wow/wow_item_spec.rb
104
+ - spec/bnet_api/wow/wow_pet_spec.rb
134
105
  - spec/bnet_api/wow/wow_pvp_spec.rb
135
106
  - spec/bnet_api/wow/wow_quest_spec.rb
136
107
  - spec/bnet_api/wow/wow_realm_status_spec.rb
137
108
  - spec/bnet_api/wow/wow_recipe_spec.rb
138
109
  - spec/bnet_api/wow/wow_spell_spec.rb
139
110
  - spec/spec_helper.rb
140
- has_rdoc: