blizzard_api 0.5.1 → 0.5.2

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: 81d6f1a66cf34191acfd15d00934934c29003a2f99367ccf7e9644382ebb89b9
4
- data.tar.gz: 1d5a888c2b9505c501389a3e9bc718e6b88f643f23c52d6bceb36c61c8b13fe4
3
+ metadata.gz: 3bf4766a30de47652d2693fb7480ef30e5ef6559fbc6f3bb7cad50a35ab4b1a6
4
+ data.tar.gz: 447d04397f442f5b7ad4fab941bf54fba397f7b855a26bfd62e67cefad30f78f
5
5
  SHA512:
6
- metadata.gz: fa2270714c47f2b5913f5a28b575e7a91e1b70c81ad34cb898fcb03d7c02e68c13ee02e3c4c95012ad6c7b1ac417fabd72c11072776ea28786319fc87089ff40
7
- data.tar.gz: fd626a5eafa0630bc3003ace854f2adb65f383ac2e84f755f7325e670804aca1cfde9a82edea687ef99e06850a9e6c4b54d0462b45e265bc400c03d57b498e2a
6
+ metadata.gz: 851bdad8472fcaf5e385b8caba51376636ea30be09ee79ecb5a383971196945574b8a3073b465f940a3aee123f885ab5358d3f2ba6bcf5eb38fb59da5bcdb660
7
+ data.tar.gz: 48bfe00c18fea3f3d296f1b49e800e54c67ff1a6b8e5972086e4d2f95cc014b5751e53c10a526a4e2bf103342cdea6c441a2987e59e00b5c0cfdc2d3d16d4334
@@ -1,5 +1,9 @@
1
1
  Please view this file on the master branch, otherwise it may be outdated
2
2
 
3
+ **Version 0.5.2**
4
+
5
+ Added new endpoints: https://us.forums.blizzard.com/en/blizzard/t/wow-shadowlands-api-update-covenenats-soulbinds-more/13385
6
+
3
7
  **Version 0.5.1**
4
8
 
5
9
  Added new endpoints: https://us.forums.blizzard.com/en/blizzard/t/wow-game-data-api-modified-crafting-support/12727
@@ -2,5 +2,5 @@
2
2
 
3
3
  module BlizzardApi
4
4
  # Gem version
5
- VERSION = '0.5.1'
5
+ VERSION = '0.5.2'
6
6
  end
@@ -14,6 +14,7 @@ module BlizzardApi
14
14
  require_relative 'wow/game_data/auction'
15
15
  require_relative 'wow/game_data/azerite_essence'
16
16
  require_relative 'wow/game_data/connected_realm'
17
+ require_relative 'wow/game_data/covenant'
17
18
  require_relative 'wow/game_data/creature'
18
19
  require_relative 'wow/game_data/guild_crest'
19
20
  require_relative 'wow/game_data/item'
@@ -39,6 +40,7 @@ module BlizzardApi
39
40
  require_relative 'wow/game_data/reputation'
40
41
  require_relative 'wow/game_data/spell'
41
42
  require_relative 'wow/game_data/talent'
43
+ require_relative 'wow/game_data/tech_talent'
42
44
  require_relative 'wow/game_data/title'
43
45
  require_relative 'wow/game_data/wow_token'
44
46
 
@@ -70,6 +72,13 @@ module BlizzardApi
70
72
  BlizzardApi::Wow::ConnectedRealm.new(region)
71
73
  end
72
74
 
75
+ ##
76
+ # @param region [String] API Region
77
+ # @return {Covenant}
78
+ def self.covenant(region = BlizzardApi.region)
79
+ BlizzardApi::Wow::Covenant.new(region)
80
+ end
81
+
73
82
  ##
74
83
  # @param region [String] API Region
75
84
  # @return {Creature}
@@ -245,6 +254,13 @@ module BlizzardApi
245
254
  BlizzardApi::Wow::Talent.new(region)
246
255
  end
247
256
 
257
+ ##
258
+ # @param region [String] API Region
259
+ # @return {TechTalent}
260
+ def self.tech_talent(region = BlizzardApi.region)
261
+ BlizzardApi::Wow::TechTalent.new(region)
262
+ end
263
+
248
264
  ##
249
265
  # @param region [String] API Region
250
266
  # @return {Title}
@@ -0,0 +1,79 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BlizzardApi
4
+ module Wow
5
+ ##
6
+ # This class allows access to World of Warcraft azerite essences
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.azerite_essence
12
+ class Covenant < Wow::GenericDataEndpoint
13
+ ##
14
+ # Fetch media for one of the covenants listed by the {#index} using its *id*
15
+ #
16
+ # @param id [Integer] Covenant id
17
+ #
18
+ # @!macro request_options
19
+ #
20
+ # @!macro response
21
+ def media(id, options = {})
22
+ api_request "#{base_url(:media)}/covenant/#{id}", default_options.merge(options)
23
+ end
24
+
25
+ ##
26
+ # Fetch all soulbinds
27
+ #
28
+ # @!macro request_options
29
+ #
30
+ # @!macro response
31
+ def soulbinds(options = {})
32
+ api_request "#{base_url(:game_data)}/covenant/soulbind/index", default_options.merge(options)
33
+ end
34
+
35
+ ##
36
+ # Fetch a soulbind by its id
37
+ #
38
+ # @param id Soulbind id
39
+ #
40
+ # @!macro request_options
41
+ #
42
+ # @!macro response
43
+ def soulbind(id, options = {})
44
+ api_request "#{base_url(:game_data)}/covenant/soulbind/#{id}", default_options.merge(options)
45
+ end
46
+
47
+ ##
48
+ # Fetch all conduits
49
+ #
50
+ # @!macro request_options
51
+ #
52
+ # @!macro response
53
+ def conduits(options = {})
54
+ api_request "#{base_url(:game_data)}/covenant/conduit/index", default_options.merge(options)
55
+ end
56
+
57
+ ##
58
+ # Fetch a conduit by its id
59
+ #
60
+ # @param id Conduit id
61
+ #
62
+ # @!macro request_options
63
+ #
64
+ # @!macro response
65
+ def conduit(id, options = {})
66
+ api_request "#{base_url(:game_data)}/covenant/conduit/#{id}", default_options.merge(options)
67
+ end
68
+
69
+ protected
70
+
71
+ def endpoint_setup
72
+ @endpoint = 'covenant'
73
+ @namespace = :static
74
+ @collection = 'covenants'
75
+ @ttl = CACHE_TRIMESTER
76
+ end
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BlizzardApi
4
+ module Wow
5
+ ##
6
+ # This class allows access to World of Warcraft talent data
7
+ #
8
+ # @see https://develop.battle.net/documentation/world-of-warcraft/game-data-apis
9
+ #
10
+ # You can get an instance of this class using the default region as follows:
11
+ # api_instance = BlizzardApi::Wow.talent
12
+ class TechTalent < Wow::GenericDataEndpoint
13
+ ##
14
+ # Fetch tech talent trees
15
+ #
16
+ # @!macro request_options
17
+ #
18
+ # @!macro response
19
+ def tech_talent_trees(options = {})
20
+ api_request "#{base_url(:game_data)}/tech-talent-tree/index", default_options.merge(options)
21
+ end
22
+
23
+ ##
24
+ # Fetch a tech talent tree
25
+ #
26
+ # @param id [Integer] Tech talent id
27
+ #
28
+ # @!macro request_options
29
+ #
30
+ # @!macro response
31
+ def tech_talent_tree(id, options = {})
32
+ api_request "#{base_url(:game_data)}/tech-talent-tree/#{id}", default_options.merge(options)
33
+ end
34
+
35
+ ##
36
+ # Fetch a tech talent media
37
+ #
38
+ # @param id [Integer] Tech talent id
39
+ #
40
+ # @!macro request_options
41
+ #
42
+ # @!macro response
43
+ def media(id, options = {})
44
+ api_request "#{base_url(:media)}/tech-talent/#{id}", default_options.merge(options)
45
+ end
46
+
47
+ protected
48
+
49
+ def endpoint_setup
50
+ @endpoint = 'tech-talent'
51
+ @namespace = :static
52
+ @collection = 'tech-talents'
53
+ @ttl = CACHE_TRIMESTER
54
+ end
55
+ end
56
+ end
57
+ end
@@ -313,6 +313,20 @@ module BlizzardApi
313
313
  character_request realm, character, options, 'reputations'
314
314
  end
315
315
 
316
+ ##
317
+ # Return a character's soulbinds
318
+ #
319
+ # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
320
+ #
321
+ # @param realm [String] The character realm's slug
322
+ # @param character [String] The character name
323
+ # @!macro request_options
324
+ #
325
+ # @!macro response
326
+ def soulbinds(realm, character, options = {})
327
+ character_request realm, character, options, 'soulbinds'
328
+ end
329
+
316
330
  ##
317
331
  # Return a character's specialization
318
332
  #
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: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francis Schiavo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-24 00:00:00.000000000 Z
11
+ date: 2020-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -155,6 +155,7 @@ files:
155
155
  - lib/blizzard_api/wow/game_data/auction.rb
156
156
  - lib/blizzard_api/wow/game_data/azerite_essence.rb
157
157
  - lib/blizzard_api/wow/game_data/connected_realm.rb
158
+ - lib/blizzard_api/wow/game_data/covenant.rb
158
159
  - lib/blizzard_api/wow/game_data/creature.rb
159
160
  - lib/blizzard_api/wow/game_data/generic_data_endpoint.rb
160
161
  - lib/blizzard_api/wow/game_data/guild_crest.rb
@@ -181,6 +182,7 @@ files:
181
182
  - lib/blizzard_api/wow/game_data/reputation.rb
182
183
  - lib/blizzard_api/wow/game_data/spell.rb
183
184
  - lib/blizzard_api/wow/game_data/talent.rb
185
+ - lib/blizzard_api/wow/game_data/tech_talent.rb
184
186
  - lib/blizzard_api/wow/game_data/title.rb
185
187
  - lib/blizzard_api/wow/game_data/wow_token.rb
186
188
  - lib/blizzard_api/wow/profile/character_profile.rb