blizzard_api 0.3.2 → 0.3.3

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: 0b9d57b5dea588a84d7b4d4a66f9885e42b66f3fc6e0be13eebca4b90fab564c
4
- data.tar.gz: 9b97294d3acaeb1525cd5844519ba2a77e088975bf542184d6933d48123730c6
3
+ metadata.gz: d5c188bb1adcbec831c3a8873ab78c3eca668047fb2dd299211c6b2d07d6cea3
4
+ data.tar.gz: 125c0e5fcc66e7650d3b7c9f888d89944310f06744ef91da3e01cbd09fce9a03
5
5
  SHA512:
6
- metadata.gz: db17c607f96ae46eebda6cfc550f297bd371898768a1b50da531818855d591baf7e5f0f76a63a2786d95f2010d9e3cc41977f7e8e35ef4b86db30ee2ecd1c26b
7
- data.tar.gz: eaba5b7b425e781608a36cc9258085fc98f2da4268710ffa2b4c8c324ec129ac087327d94c33749840e6bac67fa81d24af58ad2d4ac8d504c8997ad4cad8dbf4
6
+ metadata.gz: 1957b2cec5bd8be947f733945ea95732e07d8e4c9e6d97efec979f9998c09eb997322c33b64f6fd0a9b30ba1e84ce68419886b9f28c03fbcdee4373af05eb092
7
+ data.tar.gz: 4f34f1c74ffcab76aa80e8bf63e537c093c7a457ce5ca9ea0749b9e4665163ff2c3da50b2fb7b48ed87511f4fe2e00661cddc6152d85515c7d0f38e1b7a0465b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  Please view this file on the master branch, otherwise it may be outdated
2
2
 
3
+ **Version 0.3.3**
4
+
5
+ Added character profile encounter endpoints:
6
+ https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-api-patch-notes-20200226/3713
7
+
8
+ Added missing media endpoints for `playable_class`, `playable_specialization` and `mythic_keystone_affix`
9
+
3
10
  **Version 0.3.2**
4
11
 
5
12
  Added new WoW endpoints: https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-api-update-visions-of-nzoth/3461
@@ -2,5 +2,5 @@
2
2
 
3
3
  module BlizzardApi
4
4
  # Gem version
5
- VERSION = '0.3.2'
5
+ VERSION = '0.3.3'
6
6
  end
@@ -10,6 +10,19 @@ module BlizzardApi
10
10
  # You can get an instance of this class using the default region as follows:
11
11
  # api_instance = BlizzardApi::Wow.mythic_keystone_affix
12
12
  class MythicKeystoneAffix < Wow::GenericDataEndpoint
13
+
14
+ ##
15
+ # Fetch media for one of the affixes listed by the {#index} using its *id*
16
+ #
17
+ # @param id [Integer] Keystone affix id
18
+ #
19
+ # @!macro request_options
20
+ #
21
+ # @!macro response
22
+ def media(id, options = {})
23
+ api_request "#{base_url(:media)}/keystone-affix/#{id}", default_options.merge(options)
24
+ end
25
+
13
26
  protected
14
27
 
15
28
  def endpoint_setup
@@ -51,6 +51,18 @@ module BlizzardApi
51
51
  data
52
52
  end
53
53
 
54
+ ##
55
+ # Fetch media for one of the playable classes listed by the {#index} using its *id*
56
+ #
57
+ # @param id [Integer] Playable class id
58
+ #
59
+ # @!macro request_options
60
+ #
61
+ # @!macro response
62
+ def media(id, options = {})
63
+ api_request "#{base_url(:media)}/playable-class/#{id}", default_options.merge(options)
64
+ end
65
+
54
66
  protected
55
67
 
56
68
  def endpoint_setup
@@ -20,6 +20,18 @@ module BlizzardApi
20
20
  response_data
21
21
  end
22
22
 
23
+ ##
24
+ # Fetch media for one of the playable specializations listed by the {#index} using its *id*
25
+ #
26
+ # @param id [Integer] Playable specialization id
27
+ #
28
+ # @!macro request_options
29
+ #
30
+ # @!macro response
31
+ def media(id, options = {})
32
+ api_request "#{base_url(:media)}/playable-specialization/#{id}", default_options.merge(options)
33
+ end
34
+
23
35
  protected
24
36
 
25
37
  def endpoint_setup
@@ -40,22 +40,21 @@ module BlizzardApi
40
40
  end
41
41
 
42
42
  ##
43
- # Return character status
43
+ # Return character achievements
44
44
  #
45
45
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
46
- # @see https://us.forums.blizzard.com/en/blizzard/t/data-protection-notice-and-faq/609
47
46
  #
48
47
  # @param realm [String] The character realm's slug
49
48
  # @param character [String] The character name
50
49
  # @!macro request_options
51
50
  #
52
51
  # @!macro response
53
- def status(realm, character, options = {})
54
- character_request realm, character, options, 'status'
52
+ def achievements(realm, character, options = {})
53
+ character_request realm, character, options, 'achievements'
55
54
  end
56
55
 
57
56
  ##
58
- # Return character achievements
57
+ # Return character achievements statistics
59
58
  #
60
59
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
61
60
  #
@@ -64,12 +63,12 @@ module BlizzardApi
64
63
  # @!macro request_options
65
64
  #
66
65
  # @!macro response
67
- def achievements(realm, character, options = {})
68
- character_request realm, character, options, 'achievements'
66
+ def achievement_statistics(realm, character, options = {})
67
+ character_request realm, character, options, 'achievements/statistics'
69
68
  end
70
69
 
71
70
  ##
72
- # Return character achievements statistics
71
+ # Return character appearance
73
72
  #
74
73
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
75
74
  #
@@ -78,12 +77,12 @@ module BlizzardApi
78
77
  # @!macro request_options
79
78
  #
80
79
  # @!macro response
81
- def achievement_statistics(realm, character, options = {})
82
- character_request realm, character, options, 'achievements/statistics'
80
+ def appearance(realm, character, options = {})
81
+ character_request realm, character, options, 'appearance'
83
82
  end
84
83
 
85
84
  ##
86
- # Return character appearance
85
+ # Return a character's collections
87
86
  #
88
87
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
89
88
  #
@@ -92,12 +91,12 @@ module BlizzardApi
92
91
  # @!macro request_options
93
92
  #
94
93
  # @!macro response
95
- def appearance(realm, character, options = {})
96
- character_request realm, character, options, 'appearance'
94
+ def collections(realm, character, options = {})
95
+ character_request realm, character, options, 'collections'
97
96
  end
98
97
 
99
98
  ##
100
- # Return character equipment
99
+ # Return a character's pet collection
101
100
  #
102
101
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
103
102
  #
@@ -106,12 +105,12 @@ module BlizzardApi
106
105
  # @!macro request_options
107
106
  #
108
107
  # @!macro response
109
- def equipment(realm, character, options = {})
110
- character_request realm, character, options, 'equipment'
108
+ def pets(realm, character, options = {})
109
+ character_request realm, character, options, 'collections/pets'
111
110
  end
112
111
 
113
112
  ##
114
- # Return character media
113
+ # Return a character's mount collection
115
114
  #
116
115
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
117
116
  #
@@ -120,27 +119,26 @@ module BlizzardApi
120
119
  # @!macro request_options
121
120
  #
122
121
  # @!macro response
123
- def media(realm, character, options = {})
124
- character_request realm, character, options, 'character-media'
122
+ def mounts(realm, character, options = {})
123
+ character_request realm, character, options, 'collections/mounts'
125
124
  end
126
125
 
127
126
  ##
128
- # Return the pvp bracket of a character
127
+ # Return a character's encounter summary
129
128
  #
130
129
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
131
130
  #
132
131
  # @param realm [String] The character realm's slug
133
132
  # @param character [String] The character name
134
- # @param bracket [String] Pvp bracket
135
133
  # @!macro request_options
136
134
  #
137
135
  # @!macro response
138
- def pvp_bracket(realm, character, bracket, options = {})
139
- character_request realm, character, options, "pvp-bracket/#{bracket}"
136
+ def encounters(realm, character, options = {})
137
+ character_request realm, character, options, 'encounters'
140
138
  end
141
139
 
142
140
  ##
143
- # Return the pvp summary of a character
141
+ # Return a character's dungeon progress
144
142
  #
145
143
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
146
144
  #
@@ -149,12 +147,12 @@ module BlizzardApi
149
147
  # @!macro request_options
150
148
  #
151
149
  # @!macro response
152
- def pvp_summary(realm, character, options = {})
153
- character_request realm, character, options, 'pvp-summary'
150
+ def dungeons(realm, character, options = {})
151
+ character_request realm, character, options, 'encounters/dungeons'
154
152
  end
155
153
 
156
154
  ##
157
- # Return a character's quests
155
+ # Return a character's raid progress
158
156
  #
159
157
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
160
158
  #
@@ -163,14 +161,12 @@ module BlizzardApi
163
161
  # @!macro request_options
164
162
  #
165
163
  # @!macro response
166
- def quests(realm, character, completed = false, options = {})
167
- return character_request realm, character, options, 'quests/completed' if completed
168
-
169
- character_request realm, character, options, 'quests'
164
+ def raids(realm, character, options = {})
165
+ character_request realm, character, options, 'encounters/raids'
170
166
  end
171
167
 
172
168
  ##
173
- # Return a character's specialization
169
+ # Return character equipment
174
170
  #
175
171
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
176
172
  #
@@ -179,12 +175,12 @@ module BlizzardApi
179
175
  # @!macro request_options
180
176
  #
181
177
  # @!macro response
182
- def specializations(realm, character, options = {})
183
- character_request realm, character, options, 'specializations'
178
+ def equipment(realm, character, options = {})
179
+ character_request realm, character, options, 'equipment'
184
180
  end
185
181
 
186
182
  ##
187
- # Return a character's statistics
183
+ # Return a character's hunter pets
188
184
  #
189
185
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
190
186
  #
@@ -193,12 +189,12 @@ module BlizzardApi
193
189
  # @!macro request_options
194
190
  #
195
191
  # @!macro response
196
- def statistics(realm, character, options = {})
197
- character_request realm, character, options, 'statistics'
192
+ def hunter_pets(realm, character, options = {})
193
+ character_request realm, character, options, 'hunter-pets'
198
194
  end
199
195
 
200
196
  ##
201
- # Return a character's titles
197
+ # Return character media
202
198
  #
203
199
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
204
200
  #
@@ -207,8 +203,8 @@ module BlizzardApi
207
203
  # @!macro request_options
208
204
  #
209
205
  # @!macro response
210
- def titles(realm, character, options = {})
211
- character_request realm, character, options, 'titles'
206
+ def media(realm, character, options = {})
207
+ character_request realm, character, options, 'character-media'
212
208
  end
213
209
 
214
210
  ##
@@ -241,35 +237,37 @@ module BlizzardApi
241
237
  end
242
238
 
243
239
  ##
244
- # Return a character's collections
240
+ # Return character status
245
241
  #
246
242
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
243
+ # @see https://us.forums.blizzard.com/en/blizzard/t/data-protection-notice-and-faq/609
247
244
  #
248
245
  # @param realm [String] The character realm's slug
249
246
  # @param character [String] The character name
250
247
  # @!macro request_options
251
248
  #
252
249
  # @!macro response
253
- def collections(realm, character, options = {})
254
- character_request realm, character, options, 'collections'
250
+ def status(realm, character, options = {})
251
+ character_request realm, character, options, 'status'
255
252
  end
256
253
 
257
254
  ##
258
- # Return a character's pet collection
255
+ # Return the pvp bracket of a character
259
256
  #
260
257
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
261
258
  #
262
259
  # @param realm [String] The character realm's slug
263
260
  # @param character [String] The character name
261
+ # @param bracket [String] Pvp bracket
264
262
  # @!macro request_options
265
263
  #
266
264
  # @!macro response
267
- def pets(realm, character, options = {})
268
- character_request realm, character, options, 'collections/pets'
265
+ def pvp_bracket(realm, character, bracket, options = {})
266
+ character_request realm, character, options, "pvp-bracket/#{bracket}"
269
267
  end
270
268
 
271
269
  ##
272
- # Return a character's mount collection
270
+ # Return the pvp summary of a character
273
271
  #
274
272
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
275
273
  #
@@ -278,8 +276,24 @@ module BlizzardApi
278
276
  # @!macro request_options
279
277
  #
280
278
  # @!macro response
281
- def mounts(realm, character, options = {})
282
- character_request realm, character, options, 'collections/mounts'
279
+ def pvp_summary(realm, character, options = {})
280
+ character_request realm, character, options, 'pvp-summary'
281
+ end
282
+
283
+ ##
284
+ # Return a character's quests
285
+ #
286
+ # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
287
+ #
288
+ # @param realm [String] The character realm's slug
289
+ # @param character [String] The character name
290
+ # @!macro request_options
291
+ #
292
+ # @!macro response
293
+ def quests(realm, character, completed = false, options = {})
294
+ return character_request realm, character, options, 'quests/completed' if completed
295
+
296
+ character_request realm, character, options, 'quests'
283
297
  end
284
298
 
285
299
  ##
@@ -297,7 +311,7 @@ module BlizzardApi
297
311
  end
298
312
 
299
313
  ##
300
- # Return a character's hunter pets
314
+ # Return a character's specialization
301
315
  #
302
316
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
303
317
  #
@@ -306,12 +320,12 @@ module BlizzardApi
306
320
  # @!macro request_options
307
321
  #
308
322
  # @!macro response
309
- def hunter_pets(realm, character, options = {})
310
- character_request realm, character, options, 'hunter-pets'
323
+ def specializations(realm, character, options = {})
324
+ character_request realm, character, options, 'specializations'
311
325
  end
312
326
 
313
327
  ##
314
- # Return a character's raid progression
328
+ # Return a character's statistics
315
329
  #
316
330
  # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
317
331
  #
@@ -320,8 +334,22 @@ module BlizzardApi
320
334
  # @!macro request_options
321
335
  #
322
336
  # @!macro response
323
- def raid_progression(realm, character, options = {})
324
- character_request realm, character, options, 'raid-progression'
337
+ def statistics(realm, character, options = {})
338
+ character_request realm, character, options, 'statistics'
339
+ end
340
+
341
+ ##
342
+ # Return a character's titles
343
+ #
344
+ # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
345
+ #
346
+ # @param realm [String] The character realm's slug
347
+ # @param character [String] The character name
348
+ # @!macro request_options
349
+ #
350
+ # @!macro response
351
+ def titles(realm, character, options = {})
352
+ character_request realm, character, options, 'titles'
325
353
  end
326
354
 
327
355
  private
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.3.2
4
+ version: 0.3.3
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-02-29 00:00:00.000000000 Z
11
+ date: 2020-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis