@pinta365/blizzard_api 0.5.0 → 0.6.0
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.
- package/README.md +14 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -160,18 +160,26 @@ blizzardAPI.setup({ region: "eu", locale: "en_GB", clientId, clientSecret });
|
|
|
160
160
|
const sword = await blizzardAPI.wow.item(33791);
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
## Upgrading
|
|
163
|
+
## Upgrading
|
|
164
|
+
|
|
165
|
+
### From 0.5 to 0.6
|
|
166
|
+
|
|
167
|
+
- A locale is always sent: when `locale` is not set, the region's main locale is used (`us`: `en_US`, `eu`: `en_GB`,
|
|
168
|
+
`kr`: `ko_KR`, `tw`: `zh_TW`, `cn`: `zh_CN`). Localized fields (`name`, `description`, ...) are therefore always
|
|
169
|
+
strings, and the types say so. Before, omitting `locale` returned an object with every locale.
|
|
170
|
+
- Response types were checked against live responses and corrected. Fields that only some characters have are now
|
|
171
|
+
optional, so you may need to handle `undefined`.
|
|
172
|
+
- The Classic clients return `Classic*` types (e.g. `ClassicCharacterProfile`, from `/wow-classic`) where fields that
|
|
173
|
+
only Retail returns are optional. The Retail types keep those fields required.
|
|
174
|
+
- `hearthstone.metadata(type)` is typed per type: `metadata("sets")` returns `MetadataSet[]`.
|
|
175
|
+
|
|
176
|
+
### From 0.4 to 0.5
|
|
164
177
|
|
|
165
178
|
- `wowClassic` now targets Classic **progression**. For Classic Era realms, use `wowClassicEra`.
|
|
166
179
|
- `mythicRaidLeaderboard(raid, faction)` takes a raid slug and `"alliance"` or `"horde"`, e.g. `("uldir", "alliance")`.
|
|
167
180
|
- `pvpSeasonLeaderboard(seasonId, bracket)` takes a bracket name, e.g. `"3v3"` or `"shuffle-overall"`.
|
|
168
181
|
- `wow`, `hearthstone` and the other namespaces are plain objects. Import types from the game entry points (see
|
|
169
182
|
[Response types](#response-types)).
|
|
170
|
-
- A locale is always sent: when `locale` is not set, the region's main locale is used (`us`: `en_US`, `eu`: `en_GB`,
|
|
171
|
-
`kr`: `ko_KR`, `tw`: `zh_TW`, `cn`: `zh_CN`). Localized fields (`name`, `description`, ...) are therefore always
|
|
172
|
-
strings, and the types say so. Before, omitting `locale` returned an object with every locale.
|
|
173
|
-
- Response types were checked against live responses and corrected. Fields that only some characters or flavors have are
|
|
174
|
-
now optional, so you may need to handle `undefined`.
|
|
175
183
|
- Some types were renamed to remove duplicates. For example, entries of the character collections are now
|
|
176
184
|
`CollectedMount`, `CollectedPet`, `CollectedToy` and `CollectedHeirloom`.
|
|
177
185
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinta365/blizzard_api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "TS library to interact with the Blizzard Battle.net API. World of Warcraft, World of Warcraft Classic, StarCraft 2, Diablo 3, Hearthstone.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blizzard",
|