blizzard_api 3.3.0 → 3.4.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
  SHA256:
3
- metadata.gz: 20cf33fde29710b0f5c1c24e5e2c7001c42a25997175def8f3e02ed7742a4b62
4
- data.tar.gz: f95f37b65054229c5fa4091a53cbbd31c20a4901282c78e4b37e07dd24636b69
3
+ metadata.gz: 3a312449c62a1d6f9f0905e1b13009ec8f6f9c0153e843ceccff71ce20572dd2
4
+ data.tar.gz: 3917df7bb6af320e2ce5cdd41e0f5309b43550a4f032a8d3e09be984f3fd9351
5
5
  SHA512:
6
- metadata.gz: d9cea099795510ba35524d15a4a77af940ba8bce410646f23b4ead61ba423b6c5567ad0804c3115fa523dc85da33d2643d87e980e4a4b4b59768c8ea45c91cc2
7
- data.tar.gz: 68a150c0d4c39e86654087e6609e20809cb5971b0cdc2f26c9553ddb7089bb61ad30b33ce3661651cb7887e8d44c5445c75a0b0df3e277dc9ed74542d7626b6c
6
+ metadata.gz: 1b5a43dc799bdfcf902da78605b5d3308f651910d1cd01d6819648087235a1f4f4f65def824f192bd0a0d1efc13baad42d6ce20c753edfa0977263b352b937c7
7
+ data.tar.gz: b7c9a62af171bb7748d8d09325cdb1b38c377b1404dbcbdcda9280cee3c4418c1b1ed1b3aabc25df43d97d0e431322490821e13f101ca75d3a0623a1118f72ff
@@ -19,3 +19,4 @@ jobs:
19
19
  BNET_APPLICATION_ID: ${{ secrets.BNET_APPLICATION_ID }}
20
20
  BNET_APPLICATION_SECRET: ${{ secrets.BNET_APPLICATION_SECRET }}
21
21
  USE_CACHE: false
22
+ IGNORE_CLASSIC_TESTS: true
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  Please view this file on the master branch, otherwise it may be outdated
2
2
 
3
+ **Version 3.4.0**
4
+
5
+ Added new collections endpoints for toys and heirlooms.
6
+
7
+ **Version 3.2.0**
8
+
9
+ Added new WoW Dragonflight talents endpoint.
10
+ Added support for Overwatch League API
11
+
3
12
  **Version 3.2.0**
4
13
 
5
14
  Added new AH commodities endpoint.
@@ -257,4 +266,4 @@ https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-api-update-collec
257
266
  * Lots of improvements to WoW endpoints
258
267
 
259
268
  **Version 0.1.0**
260
- * Initial release
269
+ * Initial release
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- blizzard_api (3.3.0)
4
+ blizzard_api (3.4.0)
5
5
  redis (~> 4.1, >= 4.1.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -129,6 +129,7 @@ end
129
129
  * [BlizzardApi::Wow.covenant](https://rubydoc.info/gems/blizzard_api/BlizzardApi/Wow/Covenant)
130
130
  * [BlizzardApi::Wow.creature](https://rubydoc.info/gems/blizzard_api/BlizzardApi/Wow/Creature)
131
131
  * [BlizzardApi::Wow.guild_crest](https://rubydoc.info/gems/blizzard_api/BlizzardApi/Wow/GuildCrest)
132
+ * [BlizzardApi::Wow.heirloom](https://rubydoc.info/gems/blizzard_api/BlizzardApi/Wow/Heirloom)
132
133
  * [BlizzardApi::Wow.item](https://rubydoc.info/gems/blizzard_api/BlizzardApi/Wow/Item)
133
134
  * [BlizzardApi::Wow.journal](https://rubydoc.info/gems/blizzard_api/BlizzardApi/Wow/Journal)
134
135
  * [BlizzardApi::Wow.media](https://rubydoc.info/gems/blizzard_api/BlizzardApi/Wow/Media)
@@ -154,6 +155,7 @@ end
154
155
  * [BlizzardApi::Wow.talent](https://rubydoc.info/gems/blizzard_api/BlizzardApi/Wow/Talent)
155
156
  * [BlizzardApi::Wow.tech_talent](https://rubydoc.info/gems/blizzard_api/BlizzardApi/Wow/TechTalent)
156
157
  * [BlizzardApi::Wow.title](https://rubydoc.info/gems/blizzard_api/BlizzardApi/Wow/Title)
158
+ * [BlizzardApi::Wow.toy](https://rubydoc.info/gems/blizzard_api/BlizzardApi/Wow/Toy)
157
159
  * [BlizzardApi::Wow.wow_token](https://rubydoc.info/gems/blizzard_api/BlizzardApi/Wow/WowToken)
158
160
 
159
161
  * [BlizzardApi::Wow.profile](https://rubydoc.info/gems/blizzard_api/BlizzardApi/Wow/Profile)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module BlizzardApi
4
4
  # Gem version
5
- VERSION = '3.3.0'
5
+ VERSION = '3.4.0'
6
6
  end
@@ -15,7 +15,7 @@ module BlizzardApi
15
15
  setup 'creature', :static, CACHE_TRIMESTER
16
16
 
17
17
  def index
18
- raise BlizzardApi::ApiException, 'Creatures endpoint doesn\'t have an index method'
18
+ raise BlizzardApi::ApiException, 'Creatures endpoint does not have an index method'
19
19
  end
20
20
 
21
21
  ##
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BlizzardApi
4
+ module Wow
5
+ ##
6
+ # This class allows access to World of Warcraft heirloom data
7
+ #
8
+ # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-game-data-api
9
+ #
10
+ # You can get an instance of this class using the default region as follows:
11
+ # api_instance = BlizzardApi::Wow.heirloom
12
+ class Heirloom < Wow::GenericDataEndpoint
13
+ setup 'heirloom', :static, CACHE_TRIMESTER
14
+ end
15
+ end
16
+ end
@@ -33,6 +33,7 @@ module BlizzardApi
33
33
  def classes(**options)
34
34
  api_request "#{endpoint_uri('class')}/index", **default_options.merge(options)
35
35
  end
36
+ alias item_classes classes
36
37
 
37
38
  ##
38
39
  # Return data about an item class
@@ -60,6 +61,7 @@ module BlizzardApi
60
61
  def subclass(id, subclass_id, **options)
61
62
  api_request "#{endpoint_uri('class')}/#{id}/item-subclass/#{subclass_id}", **default_options.merge(options)
62
63
  end
64
+ alias item_subclass subclass
63
65
 
64
66
  ##
65
67
  # Fetch media for an item using its *id*
@@ -12,6 +12,10 @@ module BlizzardApi
12
12
  class ModifiedCrafting < Wow::GenericDataEndpoint
13
13
  setup 'modified-crafting', :static, CACHE_TRIMESTER
14
14
 
15
+ def get(_id, **_options)
16
+ raise BlizzardApi::ApiException, 'This endpoint does not have a get method'
17
+ end
18
+
15
19
  ##
16
20
  # Fetch modified crafting category index
17
21
  #
@@ -58,7 +58,7 @@ module BlizzardApi
58
58
 
59
59
  def resolve_icon(media_url)
60
60
  media_data = api_request(media_url)
61
- media_data[:assets][0][:value]
61
+ media_data.dig(:assets, 0, :value)
62
62
  end
63
63
  end
64
64
  end
@@ -33,7 +33,20 @@ module BlizzardApi
33
33
  #
34
34
  # @!macro response
35
35
  def talent_tree(talent_tree_id, spec_id, **options)
36
- api_request "#{base_url(:game_data)}/talent-tree/#{talent_tree_id}/playable-specialization/#{spec_id}", **default_options.merge(options)
36
+ api_request "#{base_url(:game_data)}/talent-tree/#{talent_tree_id}/playable-specialization/#{spec_id}",
37
+ **default_options.merge(options)
38
+ end
39
+
40
+ ##
41
+ # Fetch a talent tree node
42
+ #
43
+ # @param talent_tree_id [Integer] talent tree id
44
+ #
45
+ # @!macro request_options
46
+ #
47
+ # @!macro response
48
+ def talent_tree_nodes(talent_tree_id, **options)
49
+ api_request "#{base_url(:game_data)}/talent-tree/#{talent_tree_id}", **default_options.merge(options)
37
50
  end
38
51
 
39
52
  ##
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BlizzardApi
4
+ module Wow
5
+ ##
6
+ # This class allows access to World of Warcraft toys
7
+ #
8
+ # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-game-data-api
9
+ #
10
+ # You can get an instance of this class using the default region as follows:
11
+ # api_instance = BlizzardApi::Wow.toy
12
+ class Toy < Wow::GenericDataEndpoint
13
+ setup 'toy', :static, CACHE_TRIMESTER
14
+ end
15
+ end
16
+ end
@@ -23,6 +23,7 @@ module BlizzardApi
23
23
  require_relative 'wow/game_data/covenant'
24
24
  require_relative 'wow/game_data/creature'
25
25
  require_relative 'wow/game_data/guild_crest'
26
+ require_relative 'wow/game_data/heirloom'
26
27
  require_relative 'wow/game_data/item'
27
28
  require_relative 'wow/game_data/journal'
28
29
  require_relative 'wow/game_data/media'
@@ -49,6 +50,7 @@ module BlizzardApi
49
50
  require_relative 'wow/game_data/talent'
50
51
  require_relative 'wow/game_data/tech_talent'
51
52
  require_relative 'wow/game_data/title'
53
+ require_relative 'wow/game_data/toy'
52
54
  require_relative 'wow/game_data/wow_token'
53
55
 
54
56
  ##
@@ -100,6 +102,13 @@ module BlizzardApi
100
102
  BlizzardApi::Wow::GuildCrest.new(**options)
101
103
  end
102
104
 
105
+ ##
106
+ # @!macro init_options
107
+ # @return {Heirloom}
108
+ def self.heirloom(**options)
109
+ BlizzardApi::Wow::Heirloom.new(**options)
110
+ end
111
+
103
112
  ##
104
113
  # @!macro init_options
105
114
  # @return {Item}
@@ -282,6 +291,13 @@ module BlizzardApi
282
291
  BlizzardApi::Wow::Title.new(**options)
283
292
  end
284
293
 
294
+ ##
295
+ # @!macro init_options
296
+ # @return {Toy}
297
+ def self.toy(**options)
298
+ BlizzardApi::Wow::Toy.new(**options)
299
+ end
300
+
285
301
  ##
286
302
  # @!macro init_options
287
303
  # @return {WowToken}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blizzard_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francis Schiavo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-29 00:00:00.000000000 Z
11
+ date: 2023-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -170,6 +170,7 @@ files:
170
170
  - lib/blizzard_api/wow/game_data/creature.rb
171
171
  - lib/blizzard_api/wow/game_data/generic_data_endpoint.rb
172
172
  - lib/blizzard_api/wow/game_data/guild_crest.rb
173
+ - lib/blizzard_api/wow/game_data/heirloom.rb
173
174
  - lib/blizzard_api/wow/game_data/item.rb
174
175
  - lib/blizzard_api/wow/game_data/journal.rb
175
176
  - lib/blizzard_api/wow/game_data/media.rb
@@ -196,6 +197,7 @@ files:
196
197
  - lib/blizzard_api/wow/game_data/talent.rb
197
198
  - lib/blizzard_api/wow/game_data/tech_talent.rb
198
199
  - lib/blizzard_api/wow/game_data/title.rb
200
+ - lib/blizzard_api/wow/game_data/toy.rb
199
201
  - lib/blizzard_api/wow/game_data/wow_token.rb
200
202
  - lib/blizzard_api/wow/profile/character_profile.rb
201
203
  - lib/blizzard_api/wow/profile/guild.rb