blizzard_api 4.1.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +5 -5
- data/lib/blizzard_api/version.rb +1 -1
- data/lib/blizzard_api/wow/game_data/item.rb +1 -1
- data/lib/blizzard_api/wow/game_data/item_appearance.rb +68 -0
- data/lib/blizzard_api/wow/profile/account_profile.rb +12 -1
- data/lib/blizzard_api/wow/profile/character_profile.rb +14 -0
- data/lib/blizzard_api/wow.rb +8 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25f4493d9dc72b6f70302dadcfb4679785684a62d29a532ea6cc8e3b0a73ad0e
|
4
|
+
data.tar.gz: '0298ac0da67ef8000f63f9f23d2ce79a6a5d4f853eb9863f720fb82720e238f3'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5cf53cc39f5e09877da0ff4b86a3c50a624c9d7ccf3accc5ef96851f0d0763f5f188e8c4e80dfb272f1a0c45b16b71f147a9a8664506488005bdb986c169c30
|
7
|
+
data.tar.gz: 29d93824b97b4f606822f6b1f9d7a904090e5ac993269afee2b3073aa135ad1062dbd8a94dd3b08c937af52993474869d27ce715ec9a2158640ce2dee638c346
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
Please view this file on the master branch, otherwise it may be outdated
|
2
2
|
|
3
|
+
**Version 4.2.0**
|
4
|
+
|
5
|
+
Added new collections endpoints (https://us.forums.blizzard.com/en/blizzard/t/item-appearance-and-transmog-apis/51532)
|
6
|
+
|
3
7
|
**Version 4.1.0**
|
4
8
|
|
5
9
|
Removed the discontinued Overwatch League API
|
data/Gemfile.lock
CHANGED
@@ -10,16 +10,16 @@ GEM
|
|
10
10
|
ast (2.4.2)
|
11
11
|
dotenv (3.1.2)
|
12
12
|
minitest (5.24.1)
|
13
|
-
parallel (1.
|
14
|
-
parser (3.3.4.
|
13
|
+
parallel (1.26.1)
|
14
|
+
parser (3.3.4.2)
|
15
15
|
ast (~> 2.4.1)
|
16
16
|
racc
|
17
|
-
racc (1.8.
|
17
|
+
racc (1.8.1)
|
18
18
|
rainbow (3.1.1)
|
19
19
|
rake (13.2.1)
|
20
20
|
redis (4.8.1)
|
21
21
|
regexp_parser (2.9.2)
|
22
|
-
rexml (3.3.
|
22
|
+
rexml (3.3.4)
|
23
23
|
strscan
|
24
24
|
rubocop (0.93.1)
|
25
25
|
parallel (~> 1.10)
|
@@ -30,7 +30,7 @@ GEM
|
|
30
30
|
rubocop-ast (>= 0.6.0)
|
31
31
|
ruby-progressbar (~> 1.7)
|
32
32
|
unicode-display_width (>= 1.4.0, < 2.0)
|
33
|
-
rubocop-ast (1.
|
33
|
+
rubocop-ast (1.32.0)
|
34
34
|
parser (>= 3.3.1.0)
|
35
35
|
rubocop-minitest (0.27.0)
|
36
36
|
rubocop (>= 0.90, < 2.0)
|
data/lib/blizzard_api/version.rb
CHANGED
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BlizzardApi
|
4
|
+
module Wow
|
5
|
+
##
|
6
|
+
# This class allows access to World of Warcraft item 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.item_appearance
|
12
|
+
class ItemAppearance < Wow::GenericDataEndpoint
|
13
|
+
include BlizzardApi::Wow::Searchable
|
14
|
+
|
15
|
+
setup 'item-appearance', :static, CACHE_TRIMESTER
|
16
|
+
|
17
|
+
##
|
18
|
+
# This method overrides the inherited default behavior to prevent high server load and fetch time
|
19
|
+
#
|
20
|
+
# @!macro response
|
21
|
+
def index
|
22
|
+
raise BlizzardApi::ApiException, 'This endpoint does not have an index method'
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Return a list of item appearance sets
|
27
|
+
#
|
28
|
+
# @!macro request_options
|
29
|
+
#
|
30
|
+
# @!macro response
|
31
|
+
def sets(**options)
|
32
|
+
api_request "#{endpoint_uri}/set/index", **default_options.merge(options)
|
33
|
+
end
|
34
|
+
|
35
|
+
##
|
36
|
+
# Return data about an item appearance set
|
37
|
+
#
|
38
|
+
# @param id [Integer] Item appearance set id
|
39
|
+
# @!macro request_options
|
40
|
+
#
|
41
|
+
# @!macro response
|
42
|
+
def set(id, **options)
|
43
|
+
api_request "#{endpoint_uri}/set/#{id}", **default_options.merge(options)
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Return a list of item appearance slots
|
48
|
+
#
|
49
|
+
# @!macro request_options
|
50
|
+
#
|
51
|
+
# @!macro response
|
52
|
+
def slots(**options)
|
53
|
+
api_request "#{endpoint_uri}/slot/index", **default_options.merge(options)
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# Return data about an item appearance slot
|
58
|
+
#
|
59
|
+
# @param type [Integer] Item appearance slot type
|
60
|
+
# @!macro request_options
|
61
|
+
#
|
62
|
+
# @!macro response
|
63
|
+
def slot(type, **options)
|
64
|
+
api_request "#{endpoint_uri}/slot/#{type}", **default_options.merge(options)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -38,9 +38,10 @@ module BlizzardApi
|
|
38
38
|
# @!macro request_options
|
39
39
|
#
|
40
40
|
# @!macro response
|
41
|
-
def
|
41
|
+
def collections(**options)
|
42
42
|
api_request "#{base_url(:user_profile)}/collections", **default_options.merge(options)
|
43
43
|
end
|
44
|
+
alias collection collections
|
44
45
|
|
45
46
|
##
|
46
47
|
# Returns the mount collection index for the account
|
@@ -82,6 +83,16 @@ module BlizzardApi
|
|
82
83
|
api_request "#{base_url(:user_profile)}/collections/pets", **default_options.merge(options)
|
83
84
|
end
|
84
85
|
|
86
|
+
##
|
87
|
+
# Returns the transmogs collection index for the account
|
88
|
+
#
|
89
|
+
# @!macro request_options
|
90
|
+
#
|
91
|
+
# @!macro response
|
92
|
+
def transmogs(**options)
|
93
|
+
api_request "#{base_url(:user_profile)}/collections/transmogs", **default_options.merge(options)
|
94
|
+
end
|
95
|
+
|
85
96
|
protected
|
86
97
|
|
87
98
|
def default_options
|
@@ -397,6 +397,20 @@ module BlizzardApi
|
|
397
397
|
character_request realm, character, 'titles', **options
|
398
398
|
end
|
399
399
|
|
400
|
+
##
|
401
|
+
# Return a character's transmogs
|
402
|
+
#
|
403
|
+
# @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api
|
404
|
+
#
|
405
|
+
# @param realm [String] The character realm's slug
|
406
|
+
# @param character [String] The character name
|
407
|
+
# @!macro request_options
|
408
|
+
#
|
409
|
+
# @!macro response
|
410
|
+
def transmogs(realm, character, **options)
|
411
|
+
character_request realm, character, 'transmogs', **options
|
412
|
+
end
|
413
|
+
|
400
414
|
private
|
401
415
|
|
402
416
|
def default_options(user_token = nil)
|
data/lib/blizzard_api/wow.rb
CHANGED
@@ -25,6 +25,7 @@ module BlizzardApi
|
|
25
25
|
require_relative 'wow/game_data/guild_crest'
|
26
26
|
require_relative 'wow/game_data/heirloom'
|
27
27
|
require_relative 'wow/game_data/item'
|
28
|
+
require_relative 'wow/game_data/item_appearance'
|
28
29
|
require_relative 'wow/game_data/journal'
|
29
30
|
require_relative 'wow/game_data/media'
|
30
31
|
require_relative 'wow/game_data/modified_crafting'
|
@@ -116,6 +117,13 @@ module BlizzardApi
|
|
116
117
|
BlizzardApi::Wow::Item.new(**options)
|
117
118
|
end
|
118
119
|
|
120
|
+
##
|
121
|
+
# @!macro init_options
|
122
|
+
# @return {Item}
|
123
|
+
def self.item_appearance(**options)
|
124
|
+
BlizzardApi::Wow::ItemAppearance.new(**options)
|
125
|
+
end
|
126
|
+
|
119
127
|
##
|
120
128
|
# @!macro init_options
|
121
129
|
# @return {Journal}
|
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: 4.
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francis Schiavo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -175,6 +175,7 @@ files:
|
|
175
175
|
- lib/blizzard_api/wow/game_data/guild_crest.rb
|
176
176
|
- lib/blizzard_api/wow/game_data/heirloom.rb
|
177
177
|
- lib/blizzard_api/wow/game_data/item.rb
|
178
|
+
- lib/blizzard_api/wow/game_data/item_appearance.rb
|
178
179
|
- lib/blizzard_api/wow/game_data/journal.rb
|
179
180
|
- lib/blizzard_api/wow/game_data/media.rb
|
180
181
|
- lib/blizzard_api/wow/game_data/modified_crafting.rb
|
@@ -232,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
232
233
|
- !ruby/object:Gem::Version
|
233
234
|
version: '0'
|
234
235
|
requirements: []
|
235
|
-
rubygems_version: 3.
|
236
|
+
rubygems_version: 3.5.3
|
236
237
|
signing_key:
|
237
238
|
specification_version: 4
|
238
239
|
summary: Unofficial Ruby client for Blizzard Entertainment API
|