@pinta365/blizzard_api 0.3.6 → 0.3.9

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.
Files changed (278) hide show
  1. package/README.md +1 -0
  2. package/esm/mod.d.ts +4 -2
  3. package/esm/mod.js +4 -2
  4. package/package.json +1 -1
  5. package/script/mod.d.ts +4 -2
  6. package/script/mod.js +8 -1
  7. package/esm/src/hearthstone/game_data/card_backs.d.ts +0 -22
  8. package/esm/src/hearthstone/game_data/card_backs.js +0 -23
  9. package/esm/src/hearthstone/game_data/cards.d.ts +0 -37
  10. package/esm/src/hearthstone/game_data/cards.js +0 -27
  11. package/esm/src/hearthstone/game_data/decks.d.ts +0 -88
  12. package/esm/src/hearthstone/game_data/decks.js +0 -14
  13. package/esm/src/hearthstone/game_data/metadata.d.ts +0 -95
  14. package/esm/src/hearthstone/game_data/metadata.js +0 -12
  15. package/esm/src/hearthstone/index.d.ts +0 -4
  16. package/esm/src/hearthstone/index.js +0 -4
  17. package/esm/src/hearthstone/search.d.ts +0 -20
  18. package/esm/src/hearthstone/search.js +0 -29
  19. package/esm/src/shared/auth.d.ts +0 -24
  20. package/esm/src/shared/auth.js +0 -58
  21. package/esm/src/shared/config.d.ts +0 -40
  22. package/esm/src/shared/config.js +0 -48
  23. package/esm/src/shared/errors.d.ts +0 -44
  24. package/esm/src/shared/errors.js +0 -83
  25. package/esm/src/shared/index.d.ts +0 -4
  26. package/esm/src/shared/index.js +0 -3
  27. package/esm/src/shared/request.d.ts +0 -13
  28. package/esm/src/shared/request.js +0 -43
  29. package/esm/src/shared/types.d.ts +0 -120
  30. package/esm/src/shared/types.js +0 -2
  31. package/esm/src/starcraft2/game_data/league.d.ts +0 -32
  32. package/esm/src/starcraft2/game_data/league.js +0 -21
  33. package/esm/src/starcraft2/index.d.ts +0 -1
  34. package/esm/src/starcraft2/index.js +0 -1
  35. package/esm/src/wow/game_data/achievement.d.ts +0 -84
  36. package/esm/src/wow/game_data/achievement.js +0 -69
  37. package/esm/src/wow/game_data/auction_house.d.ts +0 -64
  38. package/esm/src/wow/game_data/auction_house.js +0 -34
  39. package/esm/src/wow/game_data/azerite_essence.d.ts +0 -49
  40. package/esm/src/wow/game_data/azerite_essence.js +0 -49
  41. package/esm/src/wow/game_data/connected_realm.d.ts +0 -54
  42. package/esm/src/wow/game_data/connected_realm.js +0 -36
  43. package/esm/src/wow/game_data/covenant.d.ts +0 -108
  44. package/esm/src/wow/game_data/covenant.js +0 -89
  45. package/esm/src/wow/game_data/creature.d.ts +0 -97
  46. package/esm/src/wow/game_data/creature.js +0 -100
  47. package/esm/src/wow/game_data/guild_crest.d.ts +0 -55
  48. package/esm/src/wow/game_data/guild_crest.js +0 -39
  49. package/esm/src/wow/game_data/heirloom.d.ts +0 -79
  50. package/esm/src/wow/game_data/heirloom.js +0 -26
  51. package/esm/src/wow/game_data/item.d.ts +0 -166
  52. package/esm/src/wow/game_data/item.js +0 -101
  53. package/esm/src/wow/game_data/journal.d.ts +0 -121
  54. package/esm/src/wow/game_data/journal.js +0 -99
  55. package/esm/src/wow/game_data/keystone_affix.d.ts +0 -34
  56. package/esm/src/wow/game_data/keystone_affix.js +0 -39
  57. package/esm/src/wow/game_data/media_search.d.ts +0 -8
  58. package/esm/src/wow/game_data/media_search.js +0 -10
  59. package/esm/src/wow/game_data/modified_crafting.d.ts +0 -56
  60. package/esm/src/wow/game_data/modified_crafting.js +0 -63
  61. package/esm/src/wow/game_data/mount.d.ts +0 -30
  62. package/esm/src/wow/game_data/mount.js +0 -30
  63. package/esm/src/wow/game_data/mythic_keystone_dungeon.d.ts +0 -91
  64. package/esm/src/wow/game_data/mythic_keystone_dungeon.js +0 -88
  65. package/esm/src/wow/game_data/mythic_keystone_leaderboard.d.ts +0 -58
  66. package/esm/src/wow/game_data/mythic_keystone_leaderboard.js +0 -29
  67. package/esm/src/wow/game_data/mythic_raid_leaderboard.d.ts +0 -31
  68. package/esm/src/wow/game_data/mythic_raid_leaderboard.js +0 -15
  69. package/esm/src/wow/game_data/pet.d.ts +0 -91
  70. package/esm/src/wow/game_data/pet.js +0 -77
  71. package/esm/src/wow/game_data/playable_class.d.ts +0 -57
  72. package/esm/src/wow/game_data/playable_class.js +0 -52
  73. package/esm/src/wow/game_data/playable_race.d.ts +0 -29
  74. package/esm/src/wow/game_data/playable_race.js +0 -26
  75. package/esm/src/wow/game_data/power_type.d.ts +0 -21
  76. package/esm/src/wow/game_data/power_type.js +0 -26
  77. package/esm/src/wow/game_data/profession.d.ts +0 -85
  78. package/esm/src/wow/game_data/profession.js +0 -79
  79. package/esm/src/wow/game_data/pvp_season.d.ts +0 -99
  80. package/esm/src/wow/game_data/pvp_season.js +0 -66
  81. package/esm/src/wow/game_data/pvp_tier.d.ts +0 -40
  82. package/esm/src/wow/game_data/pvp_tier.js +0 -39
  83. package/esm/src/wow/game_data/quest.d.ts +0 -114
  84. package/esm/src/wow/game_data/quest.js +0 -101
  85. package/esm/src/wow/game_data/realm.d.ts +0 -42
  86. package/esm/src/wow/game_data/realm.js +0 -36
  87. package/esm/src/wow/game_data/region.d.ts +0 -24
  88. package/esm/src/wow/game_data/region.js +0 -26
  89. package/esm/src/wow/game_data/reputations.d.ts +0 -50
  90. package/esm/src/wow/game_data/reputations.js +0 -51
  91. package/esm/src/wow/game_data/spell.d.ts +0 -33
  92. package/esm/src/wow/game_data/spell.js +0 -37
  93. package/esm/src/wow/game_data/talent.d.ts +0 -129
  94. package/esm/src/wow/game_data/talent.js +0 -90
  95. package/esm/src/wow/game_data/tech_talent.d.ts +0 -70
  96. package/esm/src/wow/game_data/tech_talent.js +0 -64
  97. package/esm/src/wow/game_data/title.d.ts +0 -25
  98. package/esm/src/wow/game_data/title.js +0 -26
  99. package/esm/src/wow/game_data/token.d.ts +0 -16
  100. package/esm/src/wow/game_data/token.js +0 -19
  101. package/esm/src/wow/game_data/toy.d.ts +0 -24
  102. package/esm/src/wow/game_data/toy.js +0 -26
  103. package/esm/src/wow/index.d.ts +0 -53
  104. package/esm/src/wow/index.js +0 -55
  105. package/esm/src/wow/profile/character_achievements.d.ts +0 -87
  106. package/esm/src/wow/profile/character_achievements.js +0 -29
  107. package/esm/src/wow/profile/character_appearance.d.ts +0 -75
  108. package/esm/src/wow/profile/character_appearance.js +0 -15
  109. package/esm/src/wow/profile/character_collections.d.ts +0 -92
  110. package/esm/src/wow/profile/character_collections.js +0 -71
  111. package/esm/src/wow/profile/character_encounters.d.ts +0 -77
  112. package/esm/src/wow/profile/character_encounters.js +0 -43
  113. package/esm/src/wow/profile/character_equipment.d.ts +0 -132
  114. package/esm/src/wow/profile/character_equipment.js +0 -15
  115. package/esm/src/wow/profile/character_hunter_pets.d.ts +0 -21
  116. package/esm/src/wow/profile/character_hunter_pets.js +0 -15
  117. package/esm/src/wow/profile/character_media.d.ts +0 -13
  118. package/esm/src/wow/profile/character_media.js +0 -15
  119. package/esm/src/wow/profile/character_mythic_keystone_profile.d.ts +0 -58
  120. package/esm/src/wow/profile/character_mythic_keystone_profile.js +0 -32
  121. package/esm/src/wow/profile/character_professions.d.ts +0 -26
  122. package/esm/src/wow/profile/character_professions.js +0 -15
  123. package/esm/src/wow/profile/character_profile.d.ts +0 -82
  124. package/esm/src/wow/profile/character_profile.js +0 -40
  125. package/esm/src/wow/profile/character_pvp.d.ts +0 -51
  126. package/esm/src/wow/profile/character_pvp.js +0 -30
  127. package/esm/src/wow/profile/character_quests.d.ts +0 -28
  128. package/esm/src/wow/profile/character_quests.js +0 -29
  129. package/esm/src/wow/profile/character_reputations.d.ts +0 -22
  130. package/esm/src/wow/profile/character_reputations.js +0 -15
  131. package/esm/src/wow/profile/character_soulbinds.d.ts +0 -30
  132. package/esm/src/wow/profile/character_soulbinds.js +0 -15
  133. package/esm/src/wow/profile/character_specializations.d.ts +0 -44
  134. package/esm/src/wow/profile/character_specializations.js +0 -15
  135. package/esm/src/wow/profile/character_statistics.d.ts +0 -116
  136. package/esm/src/wow/profile/character_statistics.js +0 -15
  137. package/esm/src/wow/profile/character_titles.d.ts +0 -13
  138. package/esm/src/wow/profile/character_titles.js +0 -15
  139. package/esm/src/wow/profile/guild.d.ts +0 -117
  140. package/esm/src/wow/profile/guild.js +0 -57
  141. package/esm/src/wow/search.d.ts +0 -21
  142. package/esm/src/wow/search.js +0 -30
  143. package/script/src/hearthstone/game_data/card_backs.d.ts +0 -22
  144. package/script/src/hearthstone/game_data/card_backs.js +0 -28
  145. package/script/src/hearthstone/game_data/cards.d.ts +0 -37
  146. package/script/src/hearthstone/game_data/cards.js +0 -32
  147. package/script/src/hearthstone/game_data/decks.d.ts +0 -88
  148. package/script/src/hearthstone/game_data/decks.js +0 -18
  149. package/script/src/hearthstone/game_data/metadata.d.ts +0 -95
  150. package/script/src/hearthstone/game_data/metadata.js +0 -16
  151. package/script/src/hearthstone/index.d.ts +0 -4
  152. package/script/src/hearthstone/index.js +0 -13
  153. package/script/src/hearthstone/search.d.ts +0 -20
  154. package/script/src/hearthstone/search.js +0 -33
  155. package/script/src/shared/auth.d.ts +0 -24
  156. package/script/src/shared/auth.js +0 -63
  157. package/script/src/shared/config.d.ts +0 -40
  158. package/script/src/shared/config.js +0 -55
  159. package/script/src/shared/errors.d.ts +0 -44
  160. package/script/src/shared/errors.js +0 -91
  161. package/script/src/shared/index.d.ts +0 -4
  162. package/script/src/shared/index.js +0 -9
  163. package/script/src/shared/request.d.ts +0 -13
  164. package/script/src/shared/request.js +0 -47
  165. package/script/src/shared/types.d.ts +0 -120
  166. package/script/src/shared/types.js +0 -3
  167. package/script/src/starcraft2/game_data/league.d.ts +0 -32
  168. package/script/src/starcraft2/game_data/league.js +0 -25
  169. package/script/src/starcraft2/index.d.ts +0 -1
  170. package/script/src/starcraft2/index.js +0 -5
  171. package/script/src/wow/game_data/achievement.d.ts +0 -84
  172. package/script/src/wow/game_data/achievement.js +0 -77
  173. package/script/src/wow/game_data/auction_house.d.ts +0 -64
  174. package/script/src/wow/game_data/auction_house.js +0 -39
  175. package/script/src/wow/game_data/azerite_essence.d.ts +0 -49
  176. package/script/src/wow/game_data/azerite_essence.js +0 -56
  177. package/script/src/wow/game_data/connected_realm.d.ts +0 -54
  178. package/script/src/wow/game_data/connected_realm.js +0 -42
  179. package/script/src/wow/game_data/covenant.d.ts +0 -108
  180. package/script/src/wow/game_data/covenant.js +0 -99
  181. package/script/src/wow/game_data/creature.d.ts +0 -97
  182. package/script/src/wow/game_data/creature.js +0 -111
  183. package/script/src/wow/game_data/guild_crest.d.ts +0 -55
  184. package/script/src/wow/game_data/guild_crest.js +0 -45
  185. package/script/src/wow/game_data/heirloom.d.ts +0 -79
  186. package/script/src/wow/game_data/heirloom.js +0 -31
  187. package/script/src/wow/game_data/item.d.ts +0 -166
  188. package/script/src/wow/game_data/item.js +0 -112
  189. package/script/src/wow/game_data/journal.d.ts +0 -121
  190. package/script/src/wow/game_data/journal.js +0 -110
  191. package/script/src/wow/game_data/keystone_affix.d.ts +0 -34
  192. package/script/src/wow/game_data/keystone_affix.js +0 -45
  193. package/script/src/wow/game_data/media_search.d.ts +0 -8
  194. package/script/src/wow/game_data/media_search.js +0 -14
  195. package/script/src/wow/game_data/modified_crafting.d.ts +0 -56
  196. package/script/src/wow/game_data/modified_crafting.js +0 -71
  197. package/script/src/wow/game_data/mount.d.ts +0 -30
  198. package/script/src/wow/game_data/mount.js +0 -36
  199. package/script/src/wow/game_data/mythic_keystone_dungeon.d.ts +0 -91
  200. package/script/src/wow/game_data/mythic_keystone_dungeon.js +0 -98
  201. package/script/src/wow/game_data/mythic_keystone_leaderboard.d.ts +0 -58
  202. package/script/src/wow/game_data/mythic_keystone_leaderboard.js +0 -34
  203. package/script/src/wow/game_data/mythic_raid_leaderboard.d.ts +0 -31
  204. package/script/src/wow/game_data/mythic_raid_leaderboard.js +0 -19
  205. package/script/src/wow/game_data/pet.d.ts +0 -91
  206. package/script/src/wow/game_data/pet.js +0 -86
  207. package/script/src/wow/game_data/playable_class.d.ts +0 -57
  208. package/script/src/wow/game_data/playable_class.js +0 -59
  209. package/script/src/wow/game_data/playable_race.d.ts +0 -29
  210. package/script/src/wow/game_data/playable_race.js +0 -31
  211. package/script/src/wow/game_data/power_type.d.ts +0 -21
  212. package/script/src/wow/game_data/power_type.js +0 -31
  213. package/script/src/wow/game_data/profession.d.ts +0 -85
  214. package/script/src/wow/game_data/profession.js +0 -88
  215. package/script/src/wow/game_data/pvp_season.d.ts +0 -99
  216. package/script/src/wow/game_data/pvp_season.js +0 -74
  217. package/script/src/wow/game_data/pvp_tier.d.ts +0 -40
  218. package/script/src/wow/game_data/pvp_tier.js +0 -45
  219. package/script/src/wow/game_data/quest.d.ts +0 -114
  220. package/script/src/wow/game_data/quest.js +0 -112
  221. package/script/src/wow/game_data/realm.d.ts +0 -42
  222. package/script/src/wow/game_data/realm.js +0 -42
  223. package/script/src/wow/game_data/region.d.ts +0 -24
  224. package/script/src/wow/game_data/region.js +0 -31
  225. package/script/src/wow/game_data/reputations.d.ts +0 -50
  226. package/script/src/wow/game_data/reputations.js +0 -58
  227. package/script/src/wow/game_data/spell.d.ts +0 -33
  228. package/script/src/wow/game_data/spell.js +0 -43
  229. package/script/src/wow/game_data/talent.d.ts +0 -129
  230. package/script/src/wow/game_data/talent.js +0 -100
  231. package/script/src/wow/game_data/tech_talent.d.ts +0 -70
  232. package/script/src/wow/game_data/tech_talent.js +0 -72
  233. package/script/src/wow/game_data/title.d.ts +0 -25
  234. package/script/src/wow/game_data/title.js +0 -31
  235. package/script/src/wow/game_data/token.d.ts +0 -16
  236. package/script/src/wow/game_data/token.js +0 -23
  237. package/script/src/wow/game_data/toy.d.ts +0 -24
  238. package/script/src/wow/game_data/toy.js +0 -31
  239. package/script/src/wow/index.d.ts +0 -53
  240. package/script/src/wow/index.js +0 -228
  241. package/script/src/wow/profile/character_achievements.d.ts +0 -87
  242. package/script/src/wow/profile/character_achievements.js +0 -34
  243. package/script/src/wow/profile/character_appearance.d.ts +0 -75
  244. package/script/src/wow/profile/character_appearance.js +0 -19
  245. package/script/src/wow/profile/character_collections.d.ts +0 -92
  246. package/script/src/wow/profile/character_collections.js +0 -79
  247. package/script/src/wow/profile/character_encounters.d.ts +0 -77
  248. package/script/src/wow/profile/character_encounters.js +0 -49
  249. package/script/src/wow/profile/character_equipment.d.ts +0 -132
  250. package/script/src/wow/profile/character_equipment.js +0 -19
  251. package/script/src/wow/profile/character_hunter_pets.d.ts +0 -21
  252. package/script/src/wow/profile/character_hunter_pets.js +0 -19
  253. package/script/src/wow/profile/character_media.d.ts +0 -13
  254. package/script/src/wow/profile/character_media.js +0 -19
  255. package/script/src/wow/profile/character_mythic_keystone_profile.d.ts +0 -58
  256. package/script/src/wow/profile/character_mythic_keystone_profile.js +0 -37
  257. package/script/src/wow/profile/character_professions.d.ts +0 -26
  258. package/script/src/wow/profile/character_professions.js +0 -19
  259. package/script/src/wow/profile/character_profile.d.ts +0 -82
  260. package/script/src/wow/profile/character_profile.js +0 -45
  261. package/script/src/wow/profile/character_pvp.d.ts +0 -51
  262. package/script/src/wow/profile/character_pvp.js +0 -35
  263. package/script/src/wow/profile/character_quests.d.ts +0 -28
  264. package/script/src/wow/profile/character_quests.js +0 -34
  265. package/script/src/wow/profile/character_reputations.d.ts +0 -22
  266. package/script/src/wow/profile/character_reputations.js +0 -19
  267. package/script/src/wow/profile/character_soulbinds.d.ts +0 -30
  268. package/script/src/wow/profile/character_soulbinds.js +0 -19
  269. package/script/src/wow/profile/character_specializations.d.ts +0 -44
  270. package/script/src/wow/profile/character_specializations.js +0 -19
  271. package/script/src/wow/profile/character_statistics.d.ts +0 -116
  272. package/script/src/wow/profile/character_statistics.js +0 -19
  273. package/script/src/wow/profile/character_titles.d.ts +0 -13
  274. package/script/src/wow/profile/character_titles.js +0 -19
  275. package/script/src/wow/profile/guild.d.ts +0 -117
  276. package/script/src/wow/profile/guild.js +0 -64
  277. package/script/src/wow/search.d.ts +0 -21
  278. package/script/src/wow/search.js +0 -34
@@ -1,116 +0,0 @@
1
- import type { Character, KeyNameId, LinkSelfHref } from "../../shared/index.js";
2
- export interface CharacterStatistics extends LinkSelfHref {
3
- health: number;
4
- power: number;
5
- power_type: KeyNameId;
6
- speed: {
7
- rating: number;
8
- rating_bonus: number;
9
- };
10
- strength: {
11
- base: number;
12
- effective: number;
13
- };
14
- agility: {
15
- base: number;
16
- effective: number;
17
- };
18
- intellect: {
19
- base: number;
20
- effective: number;
21
- };
22
- stamina: {
23
- base: number;
24
- effective: number;
25
- };
26
- melee_crit: {
27
- rating: number;
28
- rating_bonus: number;
29
- value: number;
30
- };
31
- melee_haste: {
32
- rating: number;
33
- rating_bonus: number;
34
- value: number;
35
- };
36
- mastery: {
37
- rating: number;
38
- rating_bonus: number;
39
- value: number;
40
- };
41
- bonus_armor: number;
42
- lifesteal: {
43
- rating: number;
44
- rating_bonus: number;
45
- value: number;
46
- };
47
- versatility: number;
48
- versatility_damage_done_bonus: number;
49
- versatility_healing_done_bonus: number;
50
- versatility_damage_taken_bonus: number;
51
- avoidance: {
52
- rating: number;
53
- rating_bonus: number;
54
- };
55
- attack_power: number;
56
- main_hand_damage_min: number;
57
- main_hand_damage_max: number;
58
- main_hand_speed: number;
59
- main_hand_dps: number;
60
- off_hand_damage_min: number;
61
- off_hand_damage_max: number;
62
- off_hand_speed: number;
63
- off_hand_dps: number;
64
- spell_power: number;
65
- spell_penetration: number;
66
- spell_crit: {
67
- rating: number;
68
- rating_bonus: number;
69
- value: number;
70
- };
71
- mana_regen: number;
72
- mana_regen_combat: number;
73
- armor: {
74
- base: number;
75
- effective: number;
76
- };
77
- dodge: {
78
- rating: number;
79
- rating_bonus: number;
80
- value: number;
81
- };
82
- parry: {
83
- rating: number;
84
- rating_bonus: number;
85
- value: number;
86
- };
87
- block: {
88
- rating: number;
89
- rating_bonus: number;
90
- value: number;
91
- };
92
- ranged_crit: {
93
- rating: number;
94
- rating_bonus: number;
95
- value: number;
96
- };
97
- ranged_haste: {
98
- rating: number;
99
- rating_bonus: number;
100
- value: number;
101
- };
102
- spell_haste: {
103
- rating: number;
104
- rating_bonus: number;
105
- value: number;
106
- };
107
- character: Character;
108
- }
109
- /**
110
- * Returns a statistics summary for a character.
111
- *
112
- * @param realmSlug - The slug of the realm.
113
- * @param characterName - The lowercase name of the character.
114
- * @returns A promise that resolves to an object representing a statistics summary for a character.
115
- */
116
- export declare function characterStatistics(realmSlug: string, characterName: string): Promise<CharacterStatistics>;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.characterStatistics = void 0;
4
- const index_js_1 = require("../../shared/index.js");
5
- /**
6
- * Returns a statistics summary for a character.
7
- *
8
- * @param realmSlug - The slug of the realm.
9
- * @param characterName - The lowercase name of the character.
10
- * @returns A promise that resolves to an object representing a statistics summary for a character.
11
- */
12
- async function characterStatistics(realmSlug, characterName) {
13
- return await (0, index_js_1.request)({
14
- method: "GET",
15
- url: `/profile/wow/character/${realmSlug}/${characterName}/statistics`,
16
- namespace: "profile",
17
- });
18
- }
19
- exports.characterStatistics = characterStatistics;
@@ -1,13 +0,0 @@
1
- import type { Character, KeyNameId, LinkSelfHref } from "../../shared/index.js";
2
- export interface CharacterTitles extends LinkSelfHref {
3
- character: Character;
4
- titles: KeyNameId[];
5
- }
6
- /**
7
- * Returns a summary of titles a character has obtained.
8
- *
9
- * @param realmSlug - The slug of the realm.
10
- * @param characterName - The lowercase name of the character.
11
- * @returns A promise that resolves to an object representing a summary of titles a character has obtained.
12
- */
13
- export declare function characterTitles(realmSlug: string, characterName: string): Promise<CharacterTitles>;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.characterTitles = void 0;
4
- const index_js_1 = require("../../shared/index.js");
5
- /**
6
- * Returns a summary of titles a character has obtained.
7
- *
8
- * @param realmSlug - The slug of the realm.
9
- * @param characterName - The lowercase name of the character.
10
- * @returns A promise that resolves to an object representing a summary of titles a character has obtained.
11
- */
12
- async function characterTitles(realmSlug, characterName) {
13
- return await (0, index_js_1.request)({
14
- method: "GET",
15
- url: `/profile/wow/character/${realmSlug}/${characterName}/titles`,
16
- namespace: "profile",
17
- });
18
- }
19
- exports.characterTitles = characterTitles;
@@ -1,117 +0,0 @@
1
- import type { Character, Href, KeyId, KeyNameId, LinkSelfHref, LocalizedString, TypeName } from "../../shared/index.js";
2
- export interface Rgba {
3
- r: number;
4
- g: number;
5
- b: number;
6
- a: number;
7
- }
8
- export interface CrestAsset {
9
- id?: number;
10
- media?: KeyId;
11
- color: {
12
- id: number;
13
- rgba: Rgba;
14
- };
15
- }
16
- export interface Guild extends LinkSelfHref {
17
- key?: Href;
18
- id: number;
19
- name: string;
20
- faction: TypeName;
21
- achievement_points?: number;
22
- member_count?: number;
23
- realm: {
24
- key: Href;
25
- name: LocalizedString;
26
- id: number;
27
- slug: string;
28
- };
29
- crest?: {
30
- emblem: CrestAsset;
31
- border: CrestAsset;
32
- background: CrestAsset;
33
- };
34
- roster?: Href;
35
- achievements?: Href;
36
- created_timestamp?: number;
37
- activity?: Href;
38
- name_search: string;
39
- }
40
- export interface GuildActivity extends LinkSelfHref {
41
- guild: Guild;
42
- activities: {
43
- character_achievement: {
44
- character: Character;
45
- achievement: KeyNameId;
46
- };
47
- activity: {
48
- type: string;
49
- };
50
- timestamp: number;
51
- }[];
52
- }
53
- export interface Critiera {
54
- id: number;
55
- amount?: number;
56
- is_completed: boolean;
57
- child_criteria?: Critiera[];
58
- }
59
- export interface GuildAchievements extends LinkSelfHref {
60
- guild: Guild;
61
- total_quantity: number;
62
- total_points: number;
63
- achievements: {
64
- id: number;
65
- achievement: KeyNameId;
66
- criteria: Critiera;
67
- completed_timestamp: number;
68
- }[];
69
- category_progress: {
70
- category: KeyNameId;
71
- quantity: number;
72
- points: number;
73
- }[];
74
- recent_events: {
75
- achievement: KeyNameId;
76
- timestamp: number;
77
- }[];
78
- }
79
- export interface GuildRoster extends LinkSelfHref {
80
- guild: Guild;
81
- members: {
82
- character: Character;
83
- rank: number;
84
- }[];
85
- }
86
- /**
87
- * Returns a single guild by its name and realm.
88
- *
89
- * @param realmSlug - The slug of the realm.
90
- * @param nameSlug - The slug of the guild.
91
- * @returns A promise that resolves to an object representing a single guild by its name and realm.
92
- */
93
- export declare function guild(realmSlug: string, nameSlug: string): Promise<Guild>;
94
- /**
95
- * Returns a single guild's activity by name and realm.
96
- *
97
- * @param realmSlug - The slug of the realm.
98
- * @param nameSlug - The slug of the guild.
99
- * @returns A promise that resolves to an object representing a single guild's activity by its name and realm.
100
- */
101
- export declare function guildActivity(realmSlug: string, nameSlug: string): Promise<GuildActivity>;
102
- /**
103
- * Returns a single guild's achievements by name and realm.
104
- *
105
- * @param realmSlug - The slug of the realm.
106
- * @param nameSlug - The slug of the guild.
107
- * @returns A promise that resolves to an object representing a single guild's achievements by its name and realm.
108
- */
109
- export declare function guildAchievements(realmSlug: string, nameSlug: string): Promise<GuildAchievements>;
110
- /**
111
- * Returns a single guild's roster by its name and realm.
112
- *
113
- * @param realmSlug - The slug of the realm.
114
- * @param nameSlug - The slug of the guild.
115
- * @returns A promise that resolves to an object representing a single guild's roster by its name and realm.
116
- */
117
- export declare function guildRoster(realmSlug: string, nameSlug: string): Promise<GuildRoster>;
@@ -1,64 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.guildRoster = exports.guildAchievements = exports.guildActivity = exports.guild = void 0;
4
- const index_js_1 = require("../../shared/index.js");
5
- /**
6
- * Returns a single guild by its name and realm.
7
- *
8
- * @param realmSlug - The slug of the realm.
9
- * @param nameSlug - The slug of the guild.
10
- * @returns A promise that resolves to an object representing a single guild by its name and realm.
11
- */
12
- async function guild(realmSlug, nameSlug) {
13
- return await (0, index_js_1.request)({
14
- method: "GET",
15
- url: `/data/wow/guild/${realmSlug}/${nameSlug}`,
16
- namespace: "profile",
17
- });
18
- }
19
- exports.guild = guild;
20
- /**
21
- * Returns a single guild's activity by name and realm.
22
- *
23
- * @param realmSlug - The slug of the realm.
24
- * @param nameSlug - The slug of the guild.
25
- * @returns A promise that resolves to an object representing a single guild's activity by its name and realm.
26
- */
27
- async function guildActivity(realmSlug, nameSlug) {
28
- return await (0, index_js_1.request)({
29
- method: "GET",
30
- url: `/data/wow/guild/${realmSlug}/${nameSlug}/activity`,
31
- namespace: "profile",
32
- });
33
- }
34
- exports.guildActivity = guildActivity;
35
- /**
36
- * Returns a single guild's achievements by name and realm.
37
- *
38
- * @param realmSlug - The slug of the realm.
39
- * @param nameSlug - The slug of the guild.
40
- * @returns A promise that resolves to an object representing a single guild's achievements by its name and realm.
41
- */
42
- async function guildAchievements(realmSlug, nameSlug) {
43
- return await (0, index_js_1.request)({
44
- method: "GET",
45
- url: `/data/wow/guild/${realmSlug}/${nameSlug}/achievements`,
46
- namespace: "profile",
47
- });
48
- }
49
- exports.guildAchievements = guildAchievements;
50
- /**
51
- * Returns a single guild's roster by its name and realm.
52
- *
53
- * @param realmSlug - The slug of the realm.
54
- * @param nameSlug - The slug of the guild.
55
- * @returns A promise that resolves to an object representing a single guild's roster by its name and realm.
56
- */
57
- async function guildRoster(realmSlug, nameSlug) {
58
- return await (0, index_js_1.request)({
59
- method: "GET",
60
- url: `/data/wow/guild/${realmSlug}/${nameSlug}/roster`,
61
- namespace: "profile",
62
- });
63
- }
64
- exports.guildRoster = guildRoster;
@@ -1,21 +0,0 @@
1
- import type { Namespaces } from "../shared/index.js";
2
- export interface SearchParameters {
3
- searchFields?: Record<string | symbol, string | number>;
4
- orderBy?: string;
5
- page?: number;
6
- pageSize?: number;
7
- }
8
- export interface Search {
9
- page: number;
10
- pageSize: number;
11
- maxPageSize: number;
12
- pageCount: number;
13
- results: unknown[];
14
- }
15
- /**
16
- * Performs a search.
17
- *
18
- * @param SearchParameters - Object containing search parameters.
19
- * @returns A promise that resolves to an object representing details about the search.
20
- */
21
- export declare function search(url: string, namespace: Namespaces, searchParameters: SearchParameters): Promise<Search>;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.search = void 0;
4
- const index_js_1 = require("../shared/index.js");
5
- /**
6
- * Performs a search.
7
- *
8
- * @param SearchParameters - Object containing search parameters.
9
- * @returns A promise that resolves to an object representing details about the search.
10
- */
11
- async function search(url, namespace, searchParameters) {
12
- const searchFields = searchParameters.searchFields
13
- ? Object.fromEntries(Object.entries(searchParameters.searchFields).map(([key, value]) => [key, value.toString()]))
14
- : undefined;
15
- const qs = {
16
- ...searchFields,
17
- };
18
- if (searchParameters.orderBy) {
19
- qs.orderby = searchParameters.orderBy;
20
- }
21
- if (searchParameters.page !== undefined) {
22
- qs._page = searchParameters.page;
23
- }
24
- if (searchParameters.pageSize !== undefined) {
25
- qs._pageSize = searchParameters.pageSize;
26
- }
27
- return await (0, index_js_1.request)({
28
- method: "GET",
29
- url: `/data/wow/search${url}`,
30
- qs,
31
- namespace,
32
- });
33
- }
34
- exports.search = search;