@blizzard-api/classic-wow 0.1.0 → 1.1.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 CHANGED
@@ -15,14 +15,14 @@ You can get paths, namespaces, parameters and more for a specific endpoint by ca
15
15
  ```ts
16
16
  import { classicWow } from "@blizzard-api/classic-wow"
17
17
 
18
- const achievement = classicWow.achievement(123);
18
+ const powerType = classicWow.powerType("static-classic", 123);
19
19
  ^ { path: string, namespace: string }
20
20
  ```
21
21
 
22
22
  If you need the response types, they are also exported with "Response" appended, so to get the response type from the above code, you can import it like this:
23
23
 
24
24
  ```ts
25
- import type { AchievementResponse } from '@blizzard-api/classic-wow';
25
+ import type { PowerTypeResponse } from '@blizzard-api/classic-wow';
26
26
  ```
27
27
 
28
28
  If you simply want to use the existing object, you can use the helper from `@blizzard-api/core` like so:
@@ -30,9 +30,19 @@ If you simply want to use the existing object, you can use the helper from `@bli
30
30
  ```ts
31
31
  import { classicWow } from "@blizzard-api/classic-wow"
32
32
 
33
- const achievement = classicWow.achievement(123);
33
+ const powerType = classicWow.powerType("static-classic", 123);
34
34
  ^ { path: string, namespace: string }
35
- type AchievementResponse = ExtractResourceType<typeof achievement>;
35
+ type PowerTypeResponse = ExtractResourceType<typeof powerType>;
36
+ ```
37
+
38
+ If you don't want to use the exported classicWow object, you can also access the functions directly:
39
+
40
+ ```ts
41
+ import { powerType } from "@blizzard-api/wow"
42
+
43
+ const powerType = powerType("static-classic", 123);
44
+ ^ { path: string, namespace: string }
45
+ type PowerTypeResponse = ExtractResourceType<typeof powerType>;
36
46
  ```
37
47
 
38
48
  ## Differences to @blizzard-api/wow