blizzard_api 0.3.6 → 0.3.7

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: 98dfa44fc3124d09b6f7d748b9177f4fa4db78b75824f9c5643b3b4ec9ebd6b9
4
- data.tar.gz: 04fc32625fc155c3b2d187ea0db9d79427d902b67783b79684efc2023a29462c
3
+ metadata.gz: 5e351bbfd51f02a12020946c85f3afff934d4f772629353db8fd0dbcb919b8d0
4
+ data.tar.gz: 13f91ae897fbd2246c6805ba1d897ac77844b3155ded675b3a561ba2fcac0b0c
5
5
  SHA512:
6
- metadata.gz: 1d601c0591eb90072a937cc860e2fb5e8e42c0fc72d795207188156a7df40f17187e40604d4acc3f187c75d4ae82ce55bfd2cf1212f3311e2205500a8da01ff6
7
- data.tar.gz: 768023a73f05b338e6c03c57ba918ede8b3aa16a7f2aefa5ec61e3c4f1025e4f42c2242fdddf08a4e0559f46e86cfe25dde955ccb3c3611b62712e031ad83e2f
6
+ metadata.gz: 7cc1f2f66ec4e9ba3fb82ca83b8960c6a7a8e6bbd038a210b11614560be37edd825163e1c2968f80b9fedaae2e33c6c716e62838e701b7454ee9798ffaac09e2
7
+ data.tar.gz: 5e5a741280a5224e3d28d7999d3d04b7220bd8dfff3a14f77ef08389e5963c100232552302f3d1c1ec269f3d19e33512f556bb724fea51decd1c06da56c51cf8
@@ -1,5 +1,10 @@
1
1
  Please view this file on the master branch, otherwise it may be outdated
2
2
 
3
+ **Version 0.3.7**
4
+
5
+ Automated test improvements
6
+ Added region parameters to all game module methods. This will allow multi-region applications to have more flexibility when creating instances.
7
+
3
8
  **Version 0.3.6**
4
9
 
5
10
  Fix Diablo shortcuts.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- blizzard_api (0.3.6)
4
+ blizzard_api (0.3.7)
5
5
  redis (~> 4.1, >= 4.1.0)
6
6
 
7
7
  GEM
@@ -11,15 +11,17 @@ module BlizzardApi
11
11
  require_relative 'diablo/game_data/era'
12
12
 
13
13
  ##
14
+ # @param region [String] API Region
14
15
  # @return {Season}
15
- def self.season
16
- BlizzardApi::Diablo::Season.new
16
+ def self.season(region = BlizzardApi.region)
17
+ BlizzardApi::Diablo::Season.new(region)
17
18
  end
18
19
 
19
20
  ##
21
+ # @param region [String] API Region
20
22
  # @return {Era}
21
- def self.era
22
- BlizzardApi::Diablo::Era.new
23
+ def self.era(region = BlizzardApi.region)
24
+ BlizzardApi::Diablo::Era.new(region)
23
25
  end
24
26
 
25
27
  # Diablo community api
@@ -32,45 +34,52 @@ module BlizzardApi
32
34
  require_relative 'diablo/community/profile'
33
35
 
34
36
  ##
37
+ # @param region [String] API Region
35
38
  # @return {Act}
36
- def self.act
37
- BlizzardApi::Diablo::Act.new
39
+ def self.act(region = BlizzardApi.region)
40
+ BlizzardApi::Diablo::Act.new(region)
38
41
  end
39
42
 
40
43
  ##
44
+ # @param region [String] API Region
41
45
  # @return {Artisan}
42
- def self.artisan
43
- BlizzardApi::Diablo::Artisan.new
46
+ def self.artisan(region = BlizzardApi.region)
47
+ BlizzardApi::Diablo::Artisan.new(region)
44
48
  end
45
49
 
46
50
  ##
51
+ # @param region [String] API Region
47
52
  # @return {Follower}
48
- def self.follower
49
- BlizzardApi::Diablo::Follower.new
53
+ def self.follower(region = BlizzardApi.region)
54
+ BlizzardApi::Diablo::Follower.new(region)
50
55
  end
51
56
 
52
57
  ##
58
+ # @param region [String] API Region
53
59
  # @return {Character}
54
- def self.character
55
- BlizzardApi::Diablo::Character.new
60
+ def self.character(region = BlizzardApi.region)
61
+ BlizzardApi::Diablo::Character.new(region)
56
62
  end
57
63
 
58
64
  ##
65
+ # @param region [String] API Region
59
66
  # @return {ItemType}
60
- def self.item_type
61
- BlizzardApi::Diablo::ItemType.new
67
+ def self.item_type(region = BlizzardApi.region)
68
+ BlizzardApi::Diablo::ItemType.new(region)
62
69
  end
63
70
 
64
71
  ##
72
+ # @param region [String] API Region
65
73
  # @return {Type}
66
- def self.item
67
- BlizzardApi::Diablo::Item.new
74
+ def self.item(region = BlizzardApi.region)
75
+ BlizzardApi::Diablo::Item.new(region)
68
76
  end
69
77
 
70
78
  ##
79
+ # @param region [String] API Region
71
80
  # @return {Profile}
72
- def self.profile
73
- BlizzardApi::Diablo::Profile.new
81
+ def self.profile(region = BlizzardApi.region)
82
+ BlizzardApi::Diablo::Profile.new(region)
74
83
  end
75
84
  end
76
85
  end
@@ -13,27 +13,31 @@ module BlizzardApi
13
13
  require_relative 'hearthstone/game_data/metadata'
14
14
 
15
15
  ##
16
+ # @param region [String] API Region
16
17
  # @return {Card}
17
- def self.card
18
- BlizzardApi::Hearthstone::Card.new
18
+ def self.card(region = BlizzardApi.region)
19
+ BlizzardApi::Hearthstone::Card.new(region)
19
20
  end
20
21
 
21
22
  ##
23
+ # @param region [String] API Region
22
24
  # @return {Back}
23
- def self.back
24
- BlizzardApi::Hearthstone::Back.new
25
+ def self.back(region = BlizzardApi.region)
26
+ BlizzardApi::Hearthstone::Back.new(region)
25
27
  end
26
28
 
27
29
  ##
30
+ # @param region [String] API Region
28
31
  # @return {Deck}
29
- def self.deck
30
- BlizzardApi::Hearthstone::Deck.new
32
+ def self.deck(region = BlizzardApi.region)
33
+ BlizzardApi::Hearthstone::Deck.new(region)
31
34
  end
32
35
 
33
36
  ##
37
+ # @param region [String] API Region
34
38
  # @return {Metadata}
35
- def self.metadata
36
- BlizzardApi::Hearthstone::Metadata.new
39
+ def self.metadata(region = BlizzardApi.region)
40
+ BlizzardApi::Hearthstone::Metadata.new(region)
37
41
  end
38
42
  end
39
43
  end
@@ -3,7 +3,6 @@
3
3
  ##
4
4
  # @!macro [new] request_options
5
5
  # @param {Hash} options You can specify some options
6
- # @option options [String] :region Overrides the default region for a single call
7
6
  # @option options [String] :locale Overrides the default locale for a single call
8
7
  # @option options [String] :namespace Overrides the default namespace for a single call
9
8
  # @option options [String] :access_token Overrides the access_token for a single call
@@ -9,9 +9,10 @@ module BlizzardApi
9
9
  require_relative 'starcraft/game_data/league'
10
10
 
11
11
  ##
12
+ # @param region [String] API Region
12
13
  # @return {League}
13
- def self.league
14
- BlizzardApi::Starcraft::League.new
14
+ def self.league(region = BlizzardApi.region)
15
+ BlizzardApi::Starcraft::League.new(region)
15
16
  end
16
17
 
17
18
  # Starcraft community api
@@ -20,21 +21,24 @@ module BlizzardApi
20
21
  require_relative 'starcraft/community/account'
21
22
 
22
23
  ##
24
+ # @param region [String] API Region
23
25
  # @return {Profile}
24
- def self.profile
25
- BlizzardApi::Starcraft::Profile.new
26
+ def self.profile(region = BlizzardApi.region)
27
+ BlizzardApi::Starcraft::Profile.new(region)
26
28
  end
27
29
 
28
30
  ##
31
+ # @param region [String] API Region
29
32
  # @return {Ladder}
30
- def self.ladder
31
- BlizzardApi::Starcraft::Ladder.new
33
+ def self.ladder(region = BlizzardApi.region)
34
+ BlizzardApi::Starcraft::Ladder.new(region)
32
35
  end
33
36
 
34
37
  ##
38
+ # @param region [String] API Region
35
39
  # @return {Account}
36
- def self.account
37
- BlizzardApi::Starcraft::Account.new
40
+ def self.account(region = BlizzardApi.region)
41
+ BlizzardApi::Starcraft::Account.new(region)
38
42
  end
39
43
  end
40
44
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module BlizzardApi
4
4
  # Gem version
5
- VERSION = '0.3.6'
5
+ VERSION = '0.3.7'
6
6
  end
@@ -37,207 +37,206 @@ module BlizzardApi
37
37
  require_relative 'wow/game_data/wow_token'
38
38
 
39
39
  ##
40
+ # @param region [String] API Region
40
41
  # @return {Achievement}
41
- def self.achievement
42
- BlizzardApi::Wow::Achievement.new
42
+ def self.achievement(region = BlizzardApi.region)
43
+ BlizzardApi::Wow::Achievement.new(region)
43
44
  end
44
45
 
45
46
  ##
47
+ # @param region [String] API Region
46
48
  # @return {Auction}
47
- def self.auction
48
- BlizzardApi::Wow::Auction.new
49
+ def self.auction(region = BlizzardApi.region)
50
+ BlizzardApi::Wow::Auction.new(region)
49
51
  end
50
52
 
51
53
  ##
54
+ # @param region [String] API Region
52
55
  # @return {AzeriteEssence}
53
- def self.azerite_essence
54
- BlizzardApi::Wow::AzeriteEssence.new
56
+ def self.azerite_essence(region = BlizzardApi.region)
57
+ BlizzardApi::Wow::AzeriteEssence.new(region)
55
58
  end
56
59
 
57
60
  ##
61
+ # @param region [String] API Region
58
62
  # @return {ConnectedRealm}
59
- def self.connected_realm
60
- BlizzardApi::Wow::ConnectedRealm.new
63
+ def self.connected_realm(region = BlizzardApi.region)
64
+ BlizzardApi::Wow::ConnectedRealm.new(region)
61
65
  end
62
66
 
63
67
  ##
68
+ # @param region [String] API Region
64
69
  # @return {Creature}
65
- def self.creature
66
- BlizzardApi::Wow::Creature.new
70
+ def self.creature(region = BlizzardApi.region)
71
+ BlizzardApi::Wow::Creature.new(region)
67
72
  end
68
73
 
69
74
  ##
75
+ # @param region [String] API Region
70
76
  # @return {GuildCrest}
71
- def self.guild_crest
72
- BlizzardApi::Wow::GuildCrest.new
77
+ def self.guild_crest(region = BlizzardApi.region)
78
+ BlizzardApi::Wow::GuildCrest.new(region)
73
79
  end
74
80
 
75
81
  ##
82
+ # @param region [String] API Region
76
83
  # @return {Item}
77
- def self.item
78
- BlizzardApi::Wow::Item.new
84
+ def self.item(region = BlizzardApi.region)
85
+ BlizzardApi::Wow::Item.new(region)
79
86
  end
80
87
 
81
88
  ##
89
+ # @param region [String] API Region
82
90
  # @return {Journal}
83
- def self.journal
84
- BlizzardApi::Wow::Journal.new
91
+ def self.journal(region = BlizzardApi.region)
92
+ BlizzardApi::Wow::Journal.new(region)
85
93
  end
86
94
 
87
95
  ##
96
+ # @param region [String] API Region
88
97
  # @return {Mount}
89
- def self.mount
90
- BlizzardApi::Wow::Mount.new
98
+ def self.mount(region = BlizzardApi.region)
99
+ BlizzardApi::Wow::Mount.new(region)
91
100
  end
92
101
 
93
102
  ##
103
+ # @param region [String] API Region
94
104
  # @return {MythicKeystoneAffix}
95
- def self.mythic_keystone_affix
96
- BlizzardApi::Wow::MythicKeystoneAffix.new
105
+ def self.mythic_keystone_affix(region = BlizzardApi.region)
106
+ BlizzardApi::Wow::MythicKeystoneAffix.new(region)
97
107
  end
98
108
 
99
109
  ##
110
+ # @param region [String] API Region
100
111
  # @return {MythicKeystone}
101
- def self.mythic_keystone
102
- BlizzardApi::Wow::MythicKeystone.new
112
+ def self.mythic_keystone(region = BlizzardApi.region)
113
+ BlizzardApi::Wow::MythicKeystone.new(region)
103
114
  end
104
115
 
105
116
  ##
117
+ # @param region [String] API Region
106
118
  # @return {MythicRaidLeaderboard}
107
- def self.mythic_raid_leaderboard
108
- BlizzardApi::Wow::MythicRaidLeaderboard.new
119
+ def self.mythic_raid_leaderboard(region = BlizzardApi.region)
120
+ BlizzardApi::Wow::MythicRaidLeaderboard.new(region)
109
121
  end
110
122
 
111
123
  ##
124
+ # @param region [String] API Region
112
125
  # @return {MythicKeystoneLeaderboard}
113
- def self.mythic_keystone_leaderboard
114
- BlizzardApi::Wow::MythicKeystoneLeaderboard.new
126
+ def self.mythic_keystone_leaderboard(region = BlizzardApi.region)
127
+ BlizzardApi::Wow::MythicKeystoneLeaderboard.new(region)
115
128
  end
116
129
 
117
130
  ##
131
+ # @param region [String] API Region
118
132
  # @return {Pet}
119
- def self.pet
120
- BlizzardApi::Wow::Pet.new
133
+ def self.pet(region = BlizzardApi.region)
134
+ BlizzardApi::Wow::Pet.new(region)
121
135
  end
122
136
 
123
137
  ##
138
+ # @param region [String] API Region
124
139
  # @return {PlayableClass}
125
- def self.playable_class
126
- BlizzardApi::Wow::PlayableClass.new
140
+ def self.playable_class(region = BlizzardApi.region)
141
+ BlizzardApi::Wow::PlayableClass.new(region)
127
142
  end
128
143
 
129
144
  ##
145
+ # @param region [String] API Region
130
146
  # @return {Race}
131
- def self.playable_race
132
- BlizzardApi::Wow::PlayableRace.new
147
+ def self.playable_race(region = BlizzardApi.region)
148
+ BlizzardApi::Wow::PlayableRace.new(region)
133
149
  end
134
150
 
135
151
  ##
152
+ # @param region [String] API Region
136
153
  # @return {PlayableSpecialization}
137
- def self.playable_specialization
138
- BlizzardApi::Wow::PlayableSpecialization.new
154
+ def self.playable_specialization(region = BlizzardApi.region)
155
+ BlizzardApi::Wow::PlayableSpecialization.new(region)
139
156
  end
140
157
 
141
158
  ##
159
+ # @param region [String] API Region
142
160
  # @return {PowerType}
143
- def self.power_type
144
- BlizzardApi::Wow::PowerType.new
161
+ def self.power_type(region = BlizzardApi.region)
162
+ BlizzardApi::Wow::PowerType.new(region)
145
163
  end
146
164
 
147
165
  ##
166
+ # @param region [String] API Region
148
167
  # @return {PvpSeason}
149
- def self.pvp_season
150
- BlizzardApi::Wow::PvpSeason.new
168
+ def self.pvp_season(region = BlizzardApi.region)
169
+ BlizzardApi::Wow::PvpSeason.new(region)
151
170
  end
152
171
 
153
172
  ##
173
+ # @param region [String] API Region
154
174
  # @return {PvpTier}
155
- def self.pvp_tier
156
- BlizzardApi::Wow::PvpTier.new
175
+ def self.pvp_tier(region = BlizzardApi.region)
176
+ BlizzardApi::Wow::PvpTier.new(region)
157
177
  end
158
178
 
159
179
  ##
180
+ # @param region [String] API Region
160
181
  # @return {Quest}
161
- def self.quest
162
- BlizzardApi::Wow::Quest.new
182
+ def self.quest(region = BlizzardApi.region)
183
+ BlizzardApi::Wow::Quest.new(region)
163
184
  end
164
185
 
165
186
  ##
187
+ # @param region [String] API Region
166
188
  # @return {Realm}
167
- def self.realm
168
- BlizzardApi::Wow::Realm.new
189
+ def self.realm(region = BlizzardApi.region)
190
+ BlizzardApi::Wow::Realm.new(region)
169
191
  end
170
192
 
171
193
  ##
194
+ # @param region [String] API Region
172
195
  # @return {Region}
173
- def self.region
174
- BlizzardApi::Wow::Region.new
196
+ def self.region(region = BlizzardApi.region)
197
+ BlizzardApi::Wow::Region.new(region)
175
198
  end
176
199
 
177
200
  ##
201
+ # @param region [String] API Region
178
202
  # @return {Reputation}
179
- def self.reputation
180
- BlizzardApi::Wow::Reputation.new
203
+ def self.reputation(region = BlizzardApi.region)
204
+ BlizzardApi::Wow::Reputation.new(region)
181
205
  end
182
206
 
183
207
  ##
208
+ # @param region [String] API Region
184
209
  # @return {Spell}
185
- def self.spell
186
- BlizzardApi::Wow::Spell.new
210
+ def self.spell(region = BlizzardApi.region)
211
+ BlizzardApi::Wow::Spell.new(region)
187
212
  end
188
213
 
189
214
  ##
215
+ # @param region [String] API Region
190
216
  # @return {Talent}
191
- def self.talent
192
- BlizzardApi::Wow::Talent.new
217
+ def self.talent(region = BlizzardApi.region)
218
+ BlizzardApi::Wow::Talent.new(region)
193
219
  end
194
220
 
195
221
  ##
222
+ # @param region [String] API Region
196
223
  # @return {Title}
197
- def self.title
198
- BlizzardApi::Wow::Title.new
224
+ def self.title(region = BlizzardApi.region)
225
+ BlizzardApi::Wow::Title.new(region)
199
226
  end
200
227
 
201
228
  ##
229
+ # @param region [String] API Region
202
230
  # @return {WowToken}
203
- def self.wow_token
204
- BlizzardApi::Wow::WowToken.new
205
- end
206
-
207
- ##
208
- # @return {Boss}
209
- def self.boss
210
- BlizzardApi::Wow::Boss.new
211
- end
212
-
213
- ##
214
- # @return {Challenge}
215
- def self.challenge
216
- BlizzardApi::Wow::Challenge.new
231
+ def self.wow_token(region = BlizzardApi.region)
232
+ BlizzardApi::Wow::WowToken.new(region)
217
233
  end
218
234
 
219
235
  ##
236
+ # @param region [String] API Region
220
237
  # @return {Character}
221
- def self.character
222
- BlizzardApi::Wow::Character.new
223
- end
224
-
225
- ##
226
- # @return {PvP}
227
- def self.pvp
228
- BlizzardApi::Wow::PvP.new
229
- end
230
-
231
- ##
232
- # @return {Recipe}
233
- def self.recipe
234
- BlizzardApi::Wow::Recipe.new
235
- end
236
-
237
- ##
238
- # @return {Zone}
239
- def self.zone
240
- BlizzardApi::Wow::Zone.new
238
+ def self.character(region = BlizzardApi.region)
239
+ BlizzardApi::Wow::Character.new(region)
241
240
  end
242
241
 
243
242
  require_relative 'wow/profile/profile'
@@ -246,24 +245,25 @@ module BlizzardApi
246
245
 
247
246
  ##
248
247
  # @param token [String] A token obtained using the authorization_code flow
249
- #
250
- # @!macro request_options
248
+ # @param region [String] API Region
251
249
  #
252
250
  # @return {Profile}
253
- def self.profile(token)
254
- BlizzardApi::Wow::AccountProfile.new(token)
251
+ def self.profile(token, region = BlizzardApi.region)
252
+ BlizzardApi::Wow::AccountProfile.new(token, region)
255
253
  end
256
254
 
257
255
  ##
256
+ # @param region [String] API Region
258
257
  # @return {Guild}
259
- def self.guild
260
- BlizzardApi::Wow::Guild.new
258
+ def self.guild(region = BlizzardApi.region)
259
+ BlizzardApi::Wow::Guild.new(region)
261
260
  end
262
261
 
263
262
  ##
263
+ # @param region [String] API Region
264
264
  # @return {CharacterProfile}
265
- def self.character_profile
266
- BlizzardApi::Wow::CharacterProfile.new
265
+ def self.character_profile(region = BlizzardApi.region)
266
+ BlizzardApi::Wow::CharacterProfile.new(region)
267
267
  end
268
268
  end
269
269
  end
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.6
4
+ version: 0.3.7
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-04-09 00:00:00.000000000 Z
11
+ date: 2020-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis