blizzard_api 0.2.8 → 0.2.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d393f54b32beecd52103af873d07cc29fc6602a30cb2af5ede821c2a06a15082
4
- data.tar.gz: 18f3bb7b4525010a81d8055f4e15a83d0e7ddf9cce4587874b08561e6fa0ae0e
3
+ metadata.gz: e053e270f32f8b4b3f5ef31dd081652ac643c2108ec2505a8ccd4684b392b233
4
+ data.tar.gz: 658b55408c9aff58ba82e9f425d737d577bcbb2eead1080fb8ccc654180be81e
5
5
  SHA512:
6
- metadata.gz: 9ce54dbc13359589df640b0162c77877c6a9bdc161fb69d968981e8cad47df82326ecccb17fd98eaf1e57dcfee70db740bc23ec3b1b633e94dae03eb171303ac
7
- data.tar.gz: f5fc106293d421250af06f785823a93f3bba6657bf078b00f46f77c8c7c25dd5fc50d4427a529e74aed16d927aba13c9ca2c2d0a848cbbfb81a2a49f0812b0e5
6
+ metadata.gz: 7b003416b1ce96f0312a4c05002940bdac6a8ee5f82c638cde5627a6bff5a3a4ebc616c4a242f2beb0e4004e7a5c5314b94db360673b33dc3e0c35eb1530d3c4
7
+ data.tar.gz: 67c2413bc2cbf9f3192aa7d8187e9b5ec67eb0699b2ca5f6f0ef6f92ce7589f6008eb4edc78d825c0bf0cdbae64fc8c58f450fd7f45914cdff7ae12b7ff29150
@@ -1,5 +1,20 @@
1
1
  Please view this file on the master branch, otherwise it may be outdated
2
2
 
3
+ **Version 0.2.9**
4
+ * Added new character endpoints:
5
+ * reputations
6
+ * hunter-pets
7
+ * collections
8
+ * pets
9
+ * mounts
10
+
11
+ * Added new endpoints:
12
+ * reputation-tiers
13
+ * reputation-faction
14
+
15
+ **Version 0.2.8**
16
+ * Added the new character status endpoint
17
+
3
18
  **Version 0.2.7**
4
19
  * Changed CI process to use docker ruby images.
5
20
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- blizzard_api (0.2.8)
4
+ blizzard_api (0.2.7)
5
5
  redis (~> 4.1, >= 4.1.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -195,6 +195,12 @@ Most **data** endpoints will have always 3 methods available `index`, `get` and
195
195
  - index
196
196
  - get :id
197
197
  - media :id
198
+ * Blizzard::Wow::ReputationTier
199
+ - index
200
+ - get :id
201
+ * Blizzard::Wow::ReputationFaction
202
+ - index
203
+ - get :id
198
204
 
199
205
  * Blizzard::Wow::Auction
200
206
  - get :realm
@@ -223,6 +229,7 @@ Most **data** endpoints will have always 3 methods available `index`, `get` and
223
229
  * BlizzardApi::Wow::CharacterProfile
224
230
  - get_user_characters :user_token
225
231
  - get :realm, :character, :fields
232
+ - status :realm, :character
226
233
  - pvp_summmary :realm, :character, :user_token
227
234
  - pvp_bracket :realm, :character, :bracket, :user_token
228
235
  - achievements :realm, :character
@@ -236,7 +243,11 @@ Most **data** endpoints will have always 3 methods available `index`, `get` and
236
243
  - titles :realm, :character
237
244
  - mythic_keystone_profile :realm, :character
238
245
  - mythic_keystone_seasons :realm, :character
239
- - collections :realm, :character (Not active yet on Blizzard servers)
246
+ - collections :realm, :character
247
+ - pets :realm, :character
248
+ - mounts :realm, :character
249
+ - hunter_pets :realm, :character
250
+ - reputations :realm, :character
240
251
  - raid_progression :realm, :character (Not active yet on Blizzard servers)
241
252
 
242
253
  ### 4.2. Diablo III endpoints
@@ -2,5 +2,5 @@
2
2
 
3
3
  module BlizzardApi
4
4
  # Gem version
5
- VERSION = '0.2.8'
5
+ VERSION = '0.2.9'
6
6
  end
@@ -30,6 +30,8 @@ module BlizzardApi
30
30
  require_relative 'wow/game_data/title'
31
31
  require_relative 'wow/game_data/item'
32
32
  require_relative 'wow/game_data/azerite_essence'
33
+ require_relative 'wow/game_data/reputation_tier'
34
+ require_relative 'wow/game_data/reputation_faction'
33
35
 
34
36
  ##
35
37
  # @return {Achievement}
@@ -169,6 +171,18 @@ module BlizzardApi
169
171
  BlizzardApi::Wow::AzeriteEssence.new
170
172
  end
171
173
 
174
+ ##
175
+ # @return {ReputationTier}
176
+ def self.reputation_tier
177
+ BlizzardApi::Wow::ReputationTier.new
178
+ end
179
+
180
+ ##
181
+ # @return {ReputationFaction}
182
+ def self.reputation_faction
183
+ BlizzardApi::Wow::ReputationFaction.new
184
+ end
185
+
172
186
  # Wow community api
173
187
  require_relative 'wow/community/auction'
174
188
  require_relative 'wow/community/boss'
@@ -5,6 +5,8 @@ module BlizzardApi
5
5
  ##
6
6
  # This class allows access to World of Warcraft auctions
7
7
  #
8
+ # @deprecated See https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-community-api-migration/767
9
+ #
8
10
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-community-api
9
11
  #
10
12
  # You can get an instance of this class using the default region as follows:
@@ -7,6 +7,8 @@ module BlizzardApi
7
7
  #
8
8
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-community-api
9
9
  #
10
+ # @deprecated See https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-community-api-migration/767
11
+ #
10
12
  # You can get an instance of this class using the default region as follows:
11
13
  # api_instance = BlizzardApi::Wow.boss
12
14
  class Boss < Wow::Request
@@ -7,6 +7,8 @@ module BlizzardApi
7
7
  #
8
8
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-community-api
9
9
  #
10
+ # @deprecated See https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-community-api-migration/767
11
+ #
10
12
  # You can get an instance of this class using the default region as follows:
11
13
  # api_instance = BlizzardApi::Wow.challenge
12
14
  class Challenge < Wow::Request
@@ -7,6 +7,8 @@ module BlizzardApi
7
7
  #
8
8
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-community-api
9
9
  #
10
+ # @deprecated See https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-community-api-migration/767
11
+ #
10
12
  # You can get an instance of this class using the default region as follows:
11
13
  # api_instance = BlizzardApi::Wow.pvp
12
14
  class PvP < Wow::Request
@@ -7,6 +7,8 @@ module BlizzardApi
7
7
  #
8
8
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-community-api
9
9
  #
10
+ # @deprecated See https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-community-api-migration/767
11
+ #
10
12
  # You can get an instance of this class using the default region as follows:
11
13
  # api_instance = BlizzardApi::Wow.quest
12
14
  class Quest < Wow::Request
@@ -7,6 +7,8 @@ module BlizzardApi
7
7
  #
8
8
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-community-api
9
9
  #
10
+ # @deprecated See https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-community-api-migration/767
11
+ #
10
12
  # You can get an instance of this class using the default region as follows:
11
13
  # api_instance = BlizzardApi::Wow.recipe
12
14
  class Recipe < Wow::Request
@@ -7,6 +7,8 @@ module BlizzardApi
7
7
  #
8
8
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-community-api
9
9
  #
10
+ # @deprecated See https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-community-api-migration/767
11
+ #
10
12
  # You can get an instance of this class using the default region as follows:
11
13
  # api_instance = BlizzardApi::Wow.spell
12
14
  class Spell < Wow::Request
@@ -7,6 +7,8 @@ module BlizzardApi
7
7
  #
8
8
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-community-api
9
9
  #
10
+ # @deprecated See https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-community-api-migration/767
11
+ #
10
12
  # You can get an instance of this class using the default region as follows:
11
13
  # api_instance = BlizzardApi::Wow.zone
12
14
  class Zone < Wow::Request
@@ -3,7 +3,7 @@
3
3
  module BlizzardApi
4
4
  module Wow
5
5
  ##
6
- # This class allows access to World of Warcraft achievements
6
+ # This class allows access to World of Warcraft creatures
7
7
  #
8
8
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-game-data-api
9
9
  #
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BlizzardApi
4
+ module Wow
5
+ ##
6
+ # This class allows access to World of Warcraft reputation
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.creature
12
+ class ReputationFaction < Wow::GenericDataEndpoint
13
+ protected
14
+
15
+ def endpoint_setup
16
+ @endpoint = 'reputation-faction'
17
+ @namespace = :static
18
+ @collection = 'achievements'
19
+ @ttl = CACHE_TRIMESTER
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BlizzardApi
4
+ module Wow
5
+ ##
6
+ # This class allows access to World of Warcraft reputation
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.creature
12
+ class ReputationTier < Wow::GenericDataEndpoint
13
+ protected
14
+
15
+ def endpoint_setup
16
+ @endpoint = 'reputation-tiers'
17
+ @namespace = :static
18
+ @collection = 'achievements'
19
+ @ttl = CACHE_TRIMESTER
20
+ end
21
+ end
22
+ end
23
+ end
@@ -12,25 +12,8 @@ module BlizzardApi
12
12
  class CharacterProfile < Wow::Request
13
13
  # Valid fields for character profile requests
14
14
  VALID_FIELDS = %w[
15
- achievements
16
- appearance
17
- feed
18
- guild
19
- hunterPets
20
- items
21
- mounts
22
- pets
23
- petSlots
24
- professions
25
- progression
26
- pvp
27
- quests
28
- reputation
29
- statistics
30
- stats
31
- talents
32
- titles
33
- audit
15
+ achievements appearance feed guild hunterPets items mounts pets petSlots professions progression
16
+ pvp quests reputation statistics stats talents titles audit
34
17
  ].freeze
35
18
 
36
19
  ##
@@ -83,6 +66,21 @@ module BlizzardApi
83
66
  api_request "#{base_url(:community)}/character/#{CGI.escape(realm)}/#{CGI.escape(character)}", opts
84
67
  end
85
68
 
69
+ ##
70
+ # Return character status
71
+ #
72
+ # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
73
+ # @see https://us.forums.blizzard.com/en/blizzard/t/data-protection-notice-and-faq/609
74
+ #
75
+ # @param realm [String] The character realm's slug
76
+ # @param character [String] The character name
77
+ # @!macro request_options
78
+ #
79
+ # @!macro response
80
+ def status(realm, character, options = {})
81
+ character_request realm, character, options, 'status'
82
+ end
83
+
86
84
  ##
87
85
  # Return character achievements
88
86
  #
@@ -257,6 +255,62 @@ module BlizzardApi
257
255
  character_request realm, character, options, 'collections'
258
256
  end
259
257
 
258
+ ##
259
+ # Return a character's pet collection
260
+ #
261
+ # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
262
+ #
263
+ # @param realm [String] The character realm's slug
264
+ # @param character [String] The character name
265
+ # @!macro request_options
266
+ #
267
+ # @!macro response
268
+ def pets(realm, character, options = {})
269
+ character_request realm, character, options, 'collections/pets'
270
+ end
271
+
272
+ ##
273
+ # Return a character's mount collection
274
+ #
275
+ # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
276
+ #
277
+ # @param realm [String] The character realm's slug
278
+ # @param character [String] The character name
279
+ # @!macro request_options
280
+ #
281
+ # @!macro response
282
+ def mounts(realm, character, options = {})
283
+ character_request realm, character, options, 'collections/mounts'
284
+ end
285
+
286
+ ##
287
+ # Return a character's reputations
288
+ #
289
+ # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
290
+ #
291
+ # @param realm [String] The character realm's slug
292
+ # @param character [String] The character name
293
+ # @!macro request_options
294
+ #
295
+ # @!macro response
296
+ def reputation(realm, character, options = {})
297
+ character_request realm, character, options, 'reputations'
298
+ end
299
+
300
+ ##
301
+ # Return a character's hunter pets
302
+ #
303
+ # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
304
+ #
305
+ # @param realm [String] The character realm's slug
306
+ # @param character [String] The character name
307
+ # @!macro request_options
308
+ #
309
+ # @!macro response
310
+ def hunter_pets(realm, character, options = {})
311
+ character_request realm, character, options, 'hunter-pets'
312
+ end
313
+
260
314
  ##
261
315
  # Return a character's raid progression
262
316
  #
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.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francis Schiavo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-01 00:00:00.000000000 Z
11
+ date: 2019-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -153,6 +153,8 @@ files:
153
153
  - lib/blizzard_api/wow/game_data/race.rb
154
154
  - lib/blizzard_api/wow/game_data/realm.rb
155
155
  - lib/blizzard_api/wow/game_data/region.rb
156
+ - lib/blizzard_api/wow/game_data/reputation_faction.rb
157
+ - lib/blizzard_api/wow/game_data/reputation_tier.rb
156
158
  - lib/blizzard_api/wow/game_data/title.rb
157
159
  - lib/blizzard_api/wow/game_data/wow_token.rb
158
160
  - lib/blizzard_api/wow/profile/character_profile.rb