poe-api-manager 1.2.23 → 2.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.
Files changed (180) hide show
  1. package/Changelog.md +39 -0
  2. package/README.md +142 -21
  3. package/dist/index.d.ts +5 -0
  4. package/dist/index.js +12 -0
  5. package/dist/lib/AbstractClass/PoeNinja.js +1 -1
  6. package/dist/lib/AbstractClass/PoeNinjaLeaf.d.ts +8 -0
  7. package/dist/lib/AbstractClass/PoeNinjaLeaf.js +14 -0
  8. package/dist/lib/AbstractClass/PoeWatch.js +1 -1
  9. package/dist/lib/AbstractClass/PoeWatchLeaf.d.ts +8 -0
  10. package/dist/lib/AbstractClass/PoeWatchLeaf.js +14 -0
  11. package/dist/lib/NinjaAPI.js +2 -2
  12. package/dist/lib/Poe2NinjaAPI.d.ts +25 -0
  13. package/dist/lib/Poe2NinjaAPI.js +35 -0
  14. package/dist/lib/Poe2WatchAPI.d.ts +17 -0
  15. package/dist/lib/Poe2WatchAPI.js +26 -0
  16. package/dist/lib/Utils.d.ts +14 -0
  17. package/dist/lib/Utils.js +21 -12
  18. package/dist/lib/errors/CustomError.js +4 -1
  19. package/dist/lib/mainfunctions/propertyFilter.js +4 -7
  20. package/dist/lib/modules/poe.ninja/currencyView/{currencySubModules/submodules/CurrencyModule.d.ts → CurrencyModule.d.ts} +1 -1
  21. package/dist/lib/modules/poe.ninja/currencyView/{currencySubModules/submodules/CurrencyModule.js → CurrencyModule.js} +4 -4
  22. package/dist/lib/modules/poe.ninja/currencyView/CurrencyViewModule.d.ts +5 -5
  23. package/dist/lib/modules/poe.ninja/currencyView/CurrencyViewModule.js +8 -27
  24. package/dist/lib/modules/poe.ninja/fetch/fetchData.js +17 -8
  25. package/dist/lib/modules/poe.ninja/fetch/merge/mergeData.js +7 -7
  26. package/dist/lib/modules/poe.ninja/fetch/merge/mergeExchangeData.d.ts +10 -0
  27. package/dist/lib/modules/poe.ninja/fetch/merge/mergeExchangeData.js +32 -0
  28. package/dist/lib/modules/poe.ninja/func/getData.js +7 -12
  29. package/dist/lib/modules/poe.ninja/func/getQuickCurrency.js +14 -14
  30. package/dist/lib/modules/poe.ninja/func/urlGenerator.js +18 -2
  31. package/dist/lib/modules/poe.ninja/itemView/ItemViewModule.d.ts +58 -119
  32. package/dist/lib/modules/poe.ninja/itemView/ItemViewModule.js +71 -142
  33. package/dist/lib/modules/poe.ninja/poe2/Poe2ExchangeView.d.ts +26 -0
  34. package/dist/lib/modules/poe.ninja/poe2/Poe2ExchangeView.js +55 -0
  35. package/dist/lib/modules/poe.ninja/poe2/Poe2ItemView.d.ts +20 -0
  36. package/dist/lib/modules/poe.ninja/poe2/Poe2ItemView.js +45 -0
  37. package/dist/lib/modules/poe.ninja/poe2/PoeNinja2.d.ts +26 -0
  38. package/dist/lib/modules/poe.ninja/poe2/PoeNinja2.js +48 -0
  39. package/dist/lib/modules/poe.ninja/poe2/fetchData2.d.ts +12 -0
  40. package/dist/lib/modules/poe.ninja/poe2/fetchData2.js +57 -0
  41. package/dist/lib/modules/poe.ninja/poe2/getData2.d.ts +11 -0
  42. package/dist/lib/modules/poe.ninja/poe2/getData2.js +26 -0
  43. package/dist/lib/modules/poe.ninja/poe2/urlGenerator2.d.ts +9 -0
  44. package/dist/lib/modules/poe.ninja/poe2/urlGenerator2.js +21 -0
  45. package/dist/lib/modules/poe.watch/WatchViewModule.d.ts +46 -84
  46. package/dist/lib/modules/poe.watch/WatchViewModule.js +58 -108
  47. package/dist/lib/modules/poe.watch/allModules/subModules/AccessoryModule.js +1 -6
  48. package/dist/lib/modules/poe.watch/allModules/subModules/ArmourModule.js +1 -6
  49. package/dist/lib/modules/poe.watch/allModules/subModules/BaseModule.js +1 -6
  50. package/dist/lib/modules/poe.watch/allModules/subModules/GemModule.js +1 -6
  51. package/dist/lib/modules/poe.watch/allModules/subModules/WeaponModule.js +1 -6
  52. package/dist/lib/modules/poe.watch/fetch/watchFetch.js +2 -5
  53. package/dist/lib/modules/poe.watch/func/WatchUrlGenerator.js +2 -2
  54. package/dist/lib/modules/poe.watch/func/getCategory.js +6 -3
  55. package/dist/lib/modules/poe.watch/func/getData.js +8 -13
  56. package/dist/lib/modules/poe.watch/poe2/Poe2ExchangeModule.d.ts +30 -0
  57. package/dist/lib/modules/poe.watch/poe2/Poe2ExchangeModule.js +53 -0
  58. package/dist/lib/modules/poe.watch/poe2/filterByCategory.d.ts +9 -0
  59. package/dist/lib/modules/poe.watch/poe2/filterByCategory.js +14 -0
  60. package/dist/lib/modules/poe.watch/poe2/getCategory2.d.ts +9 -0
  61. package/dist/lib/modules/poe.watch/poe2/getCategory2.js +40 -0
  62. package/dist/lib/modules/poe.watch/poe2/getData2.d.ts +9 -0
  63. package/dist/lib/modules/poe.watch/poe2/getData2.js +24 -0
  64. package/dist/lib/modules/poe.watch/poe2/unwrapItems.d.ts +11 -0
  65. package/dist/lib/modules/poe.watch/poe2/unwrapItems.js +21 -0
  66. package/dist/lib/modules/poe.watch/poe2/watchFetch2.d.ts +8 -0
  67. package/dist/lib/modules/poe.watch/poe2/watchFetch2.js +43 -0
  68. package/dist/lib/modules/poe.watch/poe2/watchUrlGenerator2.d.ts +8 -0
  69. package/dist/lib/modules/poe.watch/poe2/watchUrlGenerator2.js +13 -0
  70. package/dist/lib/modules/utils/getLeagues.js +2 -2
  71. package/dist/lib/modules/utils/getNinjaLeagues.d.ts +8 -0
  72. package/dist/lib/modules/utils/getNinjaLeagues.js +36 -0
  73. package/dist/lib/modules/utils/httpGet.d.ts +9 -0
  74. package/dist/lib/modules/utils/httpGet.js +23 -0
  75. package/package.json +14 -9
  76. package/CODE_OF_CONDUCT.md +0 -77
  77. package/CONTRIBUTING.md +0 -56
  78. package/SECURITY.md +0 -14
  79. package/dist/index.min.js +0 -1
  80. package/dist/lib/modules/poe.ninja/currencyView/currencySubModules/CurrencySubModules.d.ts +0 -2
  81. package/dist/lib/modules/poe.ninja/currencyView/currencySubModules/CurrencySubModules.js +0 -18
  82. package/dist/lib/modules/poe.ninja/currencyView/currencySubModules/submodules/FragmentModule.d.ts +0 -14
  83. package/dist/lib/modules/poe.ninja/currencyView/currencySubModules/submodules/FragmentModule.js +0 -26
  84. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/itemSubModules.d.ts +0 -29
  85. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/itemSubModules.js +0 -45
  86. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/AllflameEmberModule.d.ts +0 -12
  87. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/AllflameEmberModule.js +0 -23
  88. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BaseTypeModule.d.ts +0 -12
  89. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BaseTypeModule.js +0 -23
  90. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BeastModule.d.ts +0 -12
  91. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BeastModule.js +0 -23
  92. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BlightRavagedMapModule.d.ts +0 -12
  93. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BlightRavagedMapModule.js +0 -23
  94. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BlightedMapModule.d.ts +0 -12
  95. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BlightedMapModule.js +0 -23
  96. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ClusterJewelModule.d.ts +0 -12
  97. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ClusterJewelModule.js +0 -23
  98. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/CoffinModule.d.ts +0 -12
  99. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/CoffinModule.js +0 -22
  100. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/DeliriumOrbsModule.d.ts +0 -12
  101. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/DeliriumOrbsModule.js +0 -22
  102. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/DivinationCardModule.d.ts +0 -12
  103. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/DivinationCardModule.js +0 -22
  104. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/EssenceModule.d.ts +0 -12
  105. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/EssenceModule.js +0 -22
  106. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/FossilModule.d.ts +0 -12
  107. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/FossilModule.js +0 -22
  108. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/HelmetEnchantModule.d.ts +0 -12
  109. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/HelmetEnchantModule.js +0 -22
  110. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/IncubatorModule.d.ts +0 -12
  111. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/IncubatorModule.js +0 -22
  112. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/InvitationModule.d.ts +0 -12
  113. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/InvitationModule.js +0 -22
  114. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/MapModule.d.ts +0 -12
  115. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/MapModule.js +0 -22
  116. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/MemoryModule.d.ts +0 -12
  117. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/MemoryModule.js +0 -22
  118. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/OilModule.d.ts +0 -12
  119. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/OilModule.js +0 -22
  120. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/OmenModule.d.ts +0 -12
  121. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/OmenModule.js +0 -22
  122. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ResonatorModule.d.ts +0 -12
  123. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ResonatorModule.js +0 -22
  124. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ScarabModule.d.ts +0 -12
  125. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ScarabModule.js +0 -22
  126. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/SkillGemModule.d.ts +0 -12
  127. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/SkillGemModule.js +0 -22
  128. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueAccessoryModule.d.ts +0 -12
  129. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueAccessoryModule.js +0 -22
  130. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueArmourModule.d.ts +0 -12
  131. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueArmourModule.js +0 -22
  132. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueFlaskModule.d.ts +0 -12
  133. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueFlaskModule.js +0 -22
  134. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueJewelModule.d.ts +0 -12
  135. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueJewelModule.js +0 -22
  136. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueMapModule.d.ts +0 -12
  137. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueMapModule.js +0 -22
  138. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueRelicModule.d.ts +0 -12
  139. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueRelicModule.js +0 -22
  140. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueWeaponModule.d.ts +0 -12
  141. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueWeaponModule.js +0 -22
  142. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/VialsModule.d.ts +0 -12
  143. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/VialsModule.js +0 -22
  144. package/dist/lib/modules/poe.watch/allModules/Modules.d.ts +0 -21
  145. package/dist/lib/modules/poe.watch/allModules/Modules.js +0 -37
  146. package/dist/lib/modules/poe.watch/allModules/subModules/BeastModule.d.ts +0 -11
  147. package/dist/lib/modules/poe.watch/allModules/subModules/BeastModule.js +0 -21
  148. package/dist/lib/modules/poe.watch/allModules/subModules/CurrencyModule.d.ts +0 -11
  149. package/dist/lib/modules/poe.watch/allModules/subModules/CurrencyModule.js +0 -21
  150. package/dist/lib/modules/poe.watch/allModules/subModules/DeliriumOrbModule.d.ts +0 -11
  151. package/dist/lib/modules/poe.watch/allModules/subModules/DeliriumOrbModule.js +0 -21
  152. package/dist/lib/modules/poe.watch/allModules/subModules/DivsModule.d.ts +0 -11
  153. package/dist/lib/modules/poe.watch/allModules/subModules/DivsModule.js +0 -21
  154. package/dist/lib/modules/poe.watch/allModules/subModules/EssenceModule.d.ts +0 -11
  155. package/dist/lib/modules/poe.watch/allModules/subModules/EssenceModule.js +0 -21
  156. package/dist/lib/modules/poe.watch/allModules/subModules/FlaskModule.d.ts +0 -11
  157. package/dist/lib/modules/poe.watch/allModules/subModules/FlaskModule.js +0 -21
  158. package/dist/lib/modules/poe.watch/allModules/subModules/FossilModule.d.ts +0 -11
  159. package/dist/lib/modules/poe.watch/allModules/subModules/FossilModule.js +0 -21
  160. package/dist/lib/modules/poe.watch/allModules/subModules/FragmentModule.d.ts +0 -11
  161. package/dist/lib/modules/poe.watch/allModules/subModules/FragmentModule.js +0 -21
  162. package/dist/lib/modules/poe.watch/allModules/subModules/InscribedModule.d.ts +0 -11
  163. package/dist/lib/modules/poe.watch/allModules/subModules/InscribedModule.js +0 -21
  164. package/dist/lib/modules/poe.watch/allModules/subModules/InvitationModule.d.ts +0 -11
  165. package/dist/lib/modules/poe.watch/allModules/subModules/InvitationModule.js +0 -21
  166. package/dist/lib/modules/poe.watch/allModules/subModules/JewelModule.d.ts +0 -11
  167. package/dist/lib/modules/poe.watch/allModules/subModules/JewelModule.js +0 -21
  168. package/dist/lib/modules/poe.watch/allModules/subModules/MapModule.d.ts +0 -11
  169. package/dist/lib/modules/poe.watch/allModules/subModules/MapModule.js +0 -21
  170. package/dist/lib/modules/poe.watch/allModules/subModules/OilModule.d.ts +0 -11
  171. package/dist/lib/modules/poe.watch/allModules/subModules/OilModule.js +0 -21
  172. package/dist/lib/modules/poe.watch/allModules/subModules/ScarabModule.d.ts +0 -11
  173. package/dist/lib/modules/poe.watch/allModules/subModules/ScarabModule.js +0 -21
  174. package/dist/lib/modules/poe.watch/allModules/subModules/SextantModule.d.ts +0 -11
  175. package/dist/lib/modules/poe.watch/allModules/subModules/SextantModule.js +0 -21
  176. package/dist/lib/modules/poe.watch/allModules/subModules/UniqueMapsModule.d.ts +0 -11
  177. package/dist/lib/modules/poe.watch/allModules/subModules/UniqueMapsModule.js +0 -21
  178. package/dist/lib/modules/utils/fetchData/fetchData.d.ts +0 -10
  179. package/dist/lib/modules/utils/fetchData/fetchData.js +0 -26
  180. package/tsconfig.json +0 -12
package/Changelog.md CHANGED
@@ -1,4 +1,43 @@
1
1
  # CHANGELOG
2
+ ## [2.1.0](https://github.com/ayberkgezer/poe-api-manager/compare/v2.0.0...v2.1.0) (2026-09-07)
3
+
4
+
5
+ ### Features
6
+
7
+ * add Path of Exile 2 support for poe.ninja and poe.watch ([910b5ae](https://github.com/ayberkgezer/poe-api-manager/commit/910b5aed45392f011dd700e1467d6cb5c5b46247))
8
+ * Path of Exile 2 support and structural cleanup ([844fd06](https://github.com/ayberkgezer/poe-api-manager/commit/844fd06f240a68260b5ba56977491e701a97dccc))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * make release-please actually create releases ([ad195f9](https://github.com/ayberkgezer/poe-api-manager/commit/ad195f9e4ce3ad008e49a466ebee170b39ada480))
14
+ * make release-please create releases by pinning the component ([f8ae202](https://github.com/ayberkgezer/poe-api-manager/commit/f8ae202c4ae74dc48447515192972868c236d190))
15
+ * stop the Merge plugin from stripping the release branch component ([fa6a275](https://github.com/ayberkgezer/poe-api-manager/commit/fa6a2750928fba4566484fb1c0f4be0f84328059))
16
+ * stop the Merge plugin from stripping the release branch component ([e64f908](https://github.com/ayberkgezer/poe-api-manager/commit/e64f908a8e36b9145a40070c45f53c30494c04db))
17
+
18
+ ## 2.0.0
19
+ - 💥[Breaking] poe.ninja removed its old `/api/data/*` endpoints; the library now
20
+ targets the new `poe.ninja/poe1/api/economy/*` endpoints.
21
+ - 💥[Breaking] DeliriumOrb, DivinationCard, Essence, Fossil, Oil, Resonator,
22
+ Scarab, Omen and AllflameEmber are now served by the new exchange endpoint,
23
+ which adds/renames some value fields (e.g. `primaryValue`, conditional
24
+ `chaosValue`).
25
+ - 💥[Breaking] `itemView.helmetEnchant` removed; poe.ninja removed it upstream.
26
+ - 💥[Breaking] Errors thrown by the library are now typed `ApiError` /
27
+ `ValidationError` (with `statusCode` and `details`) instead of plain `Error`.
28
+ - 💥[Breaking] An unknown `type` on the exchange endpoint, and an invalid league
29
+ name on the exchange and item endpoints, now resolve to an empty array
30
+ instead of throwing — poe.ninja answers HTTP 200 with empty `lines` there.
31
+ The currency endpoint still throws `ApiError` if the response omits
32
+ `currencyDetails`.
33
+ - 💥[Breaking] Releases are now cut by pushing a `v*` git tag instead of
34
+ automatically on every push to `main`.
35
+ - 🛠️[Fix] Publishing now uses npm trusted publishing (OIDC) instead of an
36
+ `NPM_TOKEN` secret; npm permanently revoked classic tokens in February 2026.
37
+ - 🛠️[Fix] `mergeData` no longer silently drops currency lines it can't join.
38
+ - 🛠️[Fix] League/type values are now URL-encoded when building requests.
39
+ - 🚀[Added] `ApiError`, `ValidationError` and `CustomError` are now exported.
40
+
2
41
  ## 1.2.23
3
42
  - 🛠️[Fix] Refactor exports to use export * syntax
4
43
 
package/README.md CHANGED
@@ -3,9 +3,10 @@
3
3
  [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
4
4
  ![GitHub package.json version](https://img.shields.io/github/package-json/v/ayberkgezer/poe-api-manager)
5
5
  ![GitHub top language](https://img.shields.io/github/languages/top/ayberkgezer/poe-api-manager?logo=typescript)
6
- [![ISSUES](https://img.shields.io/github/issues/ayberkgezer/poe-api-manager-ts)](https://github.com/ayberkgezer/poe-api-manager/issues)
6
+ [![ISSUES](https://img.shields.io/github/issues/ayberkgezer/poe-api-manager)](https://github.com/ayberkgezer/poe-api-manager/issues)
7
+ [![npm](https://img.shields.io/npm/v/poe-api-manager?logo=npm)](https://www.npmjs.com/package/poe-api-manager)
7
8
  ![NPM Downloads](https://img.shields.io/npm/dt/poe-api-manager?logo=npm)
8
- ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ayberkgezer/poe-api-manager/build.yml)
9
+ ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ayberkgezer/poe-api-manager/ci.yml)
9
10
 
10
11
 
11
12
  - [Introduction](#introduction)
@@ -17,7 +18,12 @@
17
18
  - [itemView](#itemview)
18
19
  - [poe.watch](#watchapi)
19
20
  - [view](#view)
21
+ - [Path of Exile 2](#poe2ninjaapi)
22
+ - [Poe2NinjaAPI](#poe2ninjaapi)
23
+ - [Poe2WatchAPI](#poe2watchapi)
20
24
  - [utils](#utils)
25
+ - [Error handling](#error-handling)
26
+ - [Releasing](#releasing)
21
27
  - [Changelog](https://github.com/ayberkgezer/poe-api-manager/blob/main/Changelog.md)
22
28
  - [Examples](#examples)
23
29
 
@@ -84,33 +90,36 @@ ninjaAPI.currencyView.currency.getQuickCurrency(currencyTypeName).then((data)=>
84
90
  What we can get here is as follows.
85
91
  - BaseType
86
92
  - Beast
87
- - Delirium Orbs
88
- - Divination Cards
89
- - Essences
90
- - Fossils
91
- - Helment Enchant
93
+ - Delirium Orbs *(exchange)*
94
+ - Divination Cards *(exchange)*
95
+ - Essences *(exchange)*
96
+ - Fossils *(exchange)*
92
97
  - Incubators
93
98
  - Maps
94
- - Oils
95
- - Resanators
96
- - Scarabs
99
+ - Oils *(exchange)*
100
+ - Resonators *(exchange)*
101
+ - Scarabs *(exchange)*
97
102
  - Skill Gems
98
103
  - Unique Accessories
99
104
  - Unique Armours
100
- - Unique Flask
105
+ - Unique Flasks
101
106
  - Unique Jewels
102
107
  - Unique Maps
103
108
  - Unique Weapons
104
109
  - Vials
105
- - Omens
110
+ - Omens *(exchange)*
111
+ - Memories
112
+ - Invitations
106
113
  - Unique Relics
107
114
  - Cluster Jewels
108
115
  - Blighted Maps
109
116
  - Blight Ravaged Maps
110
- - Invitations
111
- - Memories
112
117
  - Coffins
113
- - Allflame Embers
118
+ - Allflame Embers *(exchange)*
119
+
120
+ > *(exchange)* means poe.ninja serves this type from its exchange endpoint instead
121
+ > of the stash endpoint. The data shape is normalized to the same `{id, name, icon}`
122
+ > contract as everything else, with an added `chaosValue` where applicable.
114
123
 
115
124
  - getData() => function returns data purely.
116
125
  ```javascript
@@ -159,7 +168,7 @@ What we can get here is as follows.
159
168
  - getData() => function returns data purely.
160
169
  ```javascript
161
170
  //Example Currency
162
- watchAPI.view.baseType.getData().then((data) => {
171
+ watchAPI.view.currency.getData().then((data) => {
163
172
  console.log(data);
164
173
  });
165
174
  ```
@@ -182,13 +191,90 @@ watchAPI.view.armour.getCategory("chest").then((data) => {
182
191
  console.log(data);
183
192
  });
184
193
  ```
194
+
195
+ ### Poe2NinjaAPI
196
+ ```javascript
197
+ const { Poe2NinjaAPI } = require("poe-api-manager");
198
+
199
+ const ninja2 = new Poe2NinjaAPI("League-Name");
200
+ ```
201
+ > Note: PoE2 economy data is empty on the "Standard" league (HTTP 200, 0 rows).
202
+ > Use an active league - discoverable via [`Utils.getPoe2Leagues()`](#utils).
203
+
204
+ #### exchange
205
+ poe.ninja PoE2 only has an exchange endpoint - **there is no PoE2 stash
206
+ currency endpoint**, so currency is served from here too.
207
+ - Currency
208
+ - Fragments
209
+ - Abyss
210
+ - UncutGems
211
+ - LineageSupportGems
212
+ - Essences
213
+ - SoulCores
214
+ - Idols
215
+ - Runes
216
+ - Ritual
217
+ - Expedition
218
+ - Delirium
219
+ - Breach
220
+ - Verisium
221
+
222
+ ```javascript
223
+ ninja2.exchange.currency.getData(["id", "name", "icon"]).then((data) => {
224
+ console.log(data);
225
+ });
226
+ ```
227
+ > PoE2 exchange values are denominated in **divine**, not chaos: rows carry a
228
+ > `primaryValue` (`core.primary === "divine"`) and no `chaosValue` field,
229
+ > unlike the PoE1 exchange types above.
230
+
231
+ #### itemView
232
+ The PoE2 stash item types.
233
+ - UniqueWeapons
234
+ - UniqueArmours
235
+ - UniqueAccessories
236
+ - UniqueFlasks
237
+ - UniqueCharms
238
+ - UniqueJewels
239
+ - UniqueSanctumRelics
240
+ - UniqueTablets
241
+ - PrecursorTablets
242
+
243
+ ```javascript
244
+ ninja2.itemView.uniqueWeapons.getData(["id", "name", "icon"]).then((data) => {
245
+ console.log(data);
246
+ });
247
+ ```
248
+
249
+ ### Poe2WatchAPI
250
+ ```javascript
251
+ const { Poe2WatchAPI } = require("poe-api-manager");
252
+
253
+ const watch2 = new Poe2WatchAPI("League-Name");
254
+ ```
255
+ poe.watch exposes exactly one PoE2 endpoint - exchange ratios - so `exchange`
256
+ is the only property here.
257
+ ```javascript
258
+ watch2.exchange.getData(["name", "category"]).then((data) => {
259
+ console.log(data);
260
+ });
261
+ ```
262
+ - getCategory("categoryName") => Filters by the `category` field (e.g. "currency").
263
+ > Note: unlike PoE1's `getCategory` (which filters on `group`), the PoE2 ratios
264
+ > response uses a `category` field instead.
265
+ ```javascript
266
+ watch2.exchange.getCategory("currency").then((data) => {
267
+ console.log(data);
268
+ });
269
+ ```
270
+
185
271
  ## Utils
186
272
  Utils class is a class that contains some auxiliary tools.
187
273
  ```javascript
188
274
  const { Utils } = require("poe-api-manager");
189
275
  const utils = new Utils();
190
276
  ```
191
- - getLeagues() => Returns available league names.
277
+ - getLeagues() => Returns available league names. PoE1-only, sourced from poe.watch.
192
278
 
193
279
  ```javascript
194
280
  utils.getLeagues().then((data) => {
@@ -196,6 +282,18 @@ utils.getLeagues().then((data) => {
196
282
  });
197
283
  ```
198
284
 
285
+ - getPoe1Leagues() / getPoe2Leagues() => Returns available league names, sourced from poe.ninja.
286
+
287
+ ```javascript
288
+ utils.getPoe1Leagues().then((data) => {
289
+ console.log(data);
290
+ });
291
+
292
+ utils.getPoe2Leagues().then((data) => {
293
+ console.log(data);
294
+ });
295
+ ```
296
+
199
297
  - filterProperties(data, properties) => It is used to filter data.
200
298
 
201
299
  ```javascript
@@ -203,15 +301,38 @@ utils.filterProperties(data, ["currencyTypeName", "chaosEquivalent"])
203
301
  .then((result) => console.log(result));
204
302
  ```
205
303
 
304
+ ## Error handling
305
+ Errors thrown by this library are `ApiError` / `ValidationError` (both extend
306
+ `CustomError`), carrying a `statusCode` and optional `details`.
307
+ ```javascript
308
+ const { NinjaAPI, ApiError } = require("poe-api-manager");
309
+
310
+ const ninjaAPI = new NinjaAPI("Standard");
311
+
312
+ try {
313
+ await ninjaAPI.currencyView.currency.getData();
314
+ } catch (err) {
315
+ if (err instanceof ApiError) {
316
+ console.error(err.statusCode, err.message, err.details);
317
+ }
318
+ }
319
+ ```
320
+
321
+ ## Releasing
322
+ Releases are automated by [release-please](https://github.com/googleapis/release-please)
323
+ from conventional commits: a `feat:`/`fix:` commit on `main` opens a release
324
+ PR, and merging that PR is what publishes to npm and creates the tag and
325
+ GitHub release. See [CONTRIBUTING.md](CONTRIBUTING.md#releasing) for the full
326
+ detail.
206
327
 
207
328
  ## Examples
208
329
  ```javascript
209
330
  const { NinjaAPI , WatchAPI } = require("poe-api-manager");
210
331
 
211
332
  // Create NinjaAPI
212
- const ninjaAPI = new NinjaAPI("Affliction");
333
+ const ninjaAPI = new NinjaAPI("Standard");
213
334
  //Create WatchAPI
214
- const watchAPI = new WatchAPI("Affliction")
335
+ const watchAPI = new WatchAPI("Standard")
215
336
 
216
337
  //We entered the filter data
217
338
  const requestedProperties = ["id", "name", "icon"];
@@ -236,9 +357,9 @@ watchAPI.view.scarab.getData(requestedProperties).then((data) => {
236
357
  const { NinjaAPI , WatchAPI } = require("poe-api-manager");
237
358
 
238
359
  // Create NinjaAPI
239
- const ninjaAPI = new NinjaAPI("Affliction");
360
+ const ninjaAPI = new NinjaAPI("Standard");
240
361
  //Create WatchAPI
241
- const watchAPI = new WatchAPI("Affliction")
362
+ const watchAPI = new WatchAPI("Standard")
242
363
 
243
364
  const requestedProperties = ["id", "name", "icon"];
244
365
 
package/dist/index.d.ts CHANGED
@@ -1,3 +1,8 @@
1
1
  export * from "./lib/NinjaAPI";
2
2
  export * from "./lib/WatchAPI";
3
+ export * from "./lib/Poe2NinjaAPI";
4
+ export * from "./lib/Poe2WatchAPI";
3
5
  export * from "./lib/Utils";
6
+ export { default as ApiError } from "./lib/errors/ApiError";
7
+ export { default as ValidationError } from "./lib/errors/ValidationError";
8
+ export { default as CustomError } from "./lib/errors/CustomError";
package/dist/index.js CHANGED
@@ -18,7 +18,19 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
18
18
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
19
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
20
  };
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
21
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.CustomError = exports.ValidationError = exports.ApiError = void 0;
22
26
  __exportStar(require("./lib/NinjaAPI"), exports);
23
27
  __exportStar(require("./lib/WatchAPI"), exports);
28
+ __exportStar(require("./lib/Poe2NinjaAPI"), exports);
29
+ __exportStar(require("./lib/Poe2WatchAPI"), exports);
24
30
  __exportStar(require("./lib/Utils"), exports);
31
+ var ApiError_1 = require("./lib/errors/ApiError");
32
+ Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return __importDefault(ApiError_1).default; } });
33
+ var ValidationError_1 = require("./lib/errors/ValidationError");
34
+ Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return __importDefault(ValidationError_1).default; } });
35
+ var CustomError_1 = require("./lib/errors/CustomError");
36
+ Object.defineProperty(exports, "CustomError", { enumerable: true, get: function () { return __importDefault(CustomError_1).default; } });
@@ -36,7 +36,7 @@ class PoeNinja {
36
36
  */
37
37
  async getData(requestedProperties) {
38
38
  try {
39
- return (0, getData_1.default)(this.league, this.typeName, this.type, requestedProperties);
39
+ return await (0, getData_1.default)(this.league, this.typeName, this.type, requestedProperties);
40
40
  }
41
41
  catch (error) {
42
42
  // Pass through custom errors
@@ -0,0 +1,8 @@
1
+ import PoeNinja from "./PoeNinja";
2
+ /**
3
+ * A PoeNinja submodule with no behaviour beyond getData(). Used for every
4
+ * itemView/currencyView type that doesn't need extra methods - currency's
5
+ * getQuickCurrency is the one exception and keeps its own class.
6
+ */
7
+ export default class PoeNinjaLeaf extends PoeNinja {
8
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const PoeNinja_1 = __importDefault(require("./PoeNinja"));
7
+ /**
8
+ * A PoeNinja submodule with no behaviour beyond getData(). Used for every
9
+ * itemView/currencyView type that doesn't need extra methods - currency's
10
+ * getQuickCurrency is the one exception and keeps its own class.
11
+ */
12
+ class PoeNinjaLeaf extends PoeNinja_1.default {
13
+ }
14
+ exports.default = PoeNinjaLeaf;
@@ -32,7 +32,7 @@ class PoeWatch {
32
32
  */
33
33
  async getData(requestedProperties) {
34
34
  try {
35
- return (0, getData_1.default)(this.league, this.type, requestedProperties);
35
+ return await (0, getData_1.default)(this.league, this.type, requestedProperties);
36
36
  }
37
37
  catch (error) {
38
38
  // Pass through custom errors
@@ -0,0 +1,8 @@
1
+ import PoeWatch from "./PoeWatch";
2
+ /**
3
+ * A PoeWatch submodule with no behaviour beyond getData(). Used for every
4
+ * view type that doesn't need getCategory - accessory/armour/base/gem/weapon
5
+ * keep their own classes for that.
6
+ */
7
+ export default class PoeWatchLeaf extends PoeWatch {
8
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const PoeWatch_1 = __importDefault(require("./PoeWatch"));
7
+ /**
8
+ * A PoeWatch submodule with no behaviour beyond getData(). Used for every
9
+ * view type that doesn't need getCategory - accessory/armour/base/gem/weapon
10
+ * keep their own classes for that.
11
+ */
12
+ class PoeWatchLeaf extends PoeWatch_1.default {
13
+ }
14
+ exports.default = PoeWatchLeaf;
@@ -26,8 +26,8 @@ class NinjaAPI {
26
26
  * @param {string} league The PoE league for which data is requested.
27
27
  */
28
28
  constructor(league) {
29
- this.currencyView = new CurrencyViewModule_1.default(league, "currencyoverview");
30
- this.itemView = new ItemViewModule_1.default(league, "itemoverview");
29
+ this.currencyView = new CurrencyViewModule_1.default(league);
30
+ this.itemView = new ItemViewModule_1.default(league);
31
31
  }
32
32
  }
33
33
  exports.NinjaAPI = NinjaAPI;
@@ -0,0 +1,25 @@
1
+ import Poe2ExchangeView from "./modules/poe.ninja/poe2/Poe2ExchangeView";
2
+ import Poe2ItemView from "./modules/poe.ninja/poe2/Poe2ItemView";
3
+ /**
4
+ * Represents an API for interacting with the poe.ninja Path of Exile 2 economy API.
5
+ * @class
6
+ */
7
+ export declare class Poe2NinjaAPI {
8
+ /**
9
+ * The exchange types for this league (includes currency - PoE2 has no
10
+ * stash currency endpoint).
11
+ * @type {Poe2ExchangeView}
12
+ */
13
+ exchange: Poe2ExchangeView;
14
+ /**
15
+ * The stash item types for this league. Empty on "Standard"; use an
16
+ * active league (see Utils.getPoe2Leagues()).
17
+ * @type {Poe2ItemView}
18
+ */
19
+ itemView: Poe2ItemView;
20
+ /**
21
+ * Creates an instance of Poe2NinjaAPI.
22
+ * @param {string} league The PoE2 league for which data is requested.
23
+ */
24
+ constructor(league: string);
25
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Poe2NinjaAPI = void 0;
7
+ const Poe2ExchangeView_1 = __importDefault(require("./modules/poe.ninja/poe2/Poe2ExchangeView"));
8
+ const Poe2ItemView_1 = __importDefault(require("./modules/poe.ninja/poe2/Poe2ItemView"));
9
+ /**
10
+ * Represents an API for interacting with the poe.ninja Path of Exile 2 economy API.
11
+ * @class
12
+ */
13
+ class Poe2NinjaAPI {
14
+ /**
15
+ * The exchange types for this league (includes currency - PoE2 has no
16
+ * stash currency endpoint).
17
+ * @type {Poe2ExchangeView}
18
+ */
19
+ exchange;
20
+ /**
21
+ * The stash item types for this league. Empty on "Standard"; use an
22
+ * active league (see Utils.getPoe2Leagues()).
23
+ * @type {Poe2ItemView}
24
+ */
25
+ itemView;
26
+ /**
27
+ * Creates an instance of Poe2NinjaAPI.
28
+ * @param {string} league The PoE2 league for which data is requested.
29
+ */
30
+ constructor(league) {
31
+ this.exchange = new Poe2ExchangeView_1.default(league);
32
+ this.itemView = new Poe2ItemView_1.default(league);
33
+ }
34
+ }
35
+ exports.Poe2NinjaAPI = Poe2NinjaAPI;
@@ -0,0 +1,17 @@
1
+ import Poe2ExchangeModule from "./modules/poe.watch/poe2/Poe2ExchangeModule";
2
+ /**
3
+ * Represents an API for interacting with poe.watch's Path of Exile 2 support.
4
+ * @class
5
+ */
6
+ export declare class Poe2WatchAPI {
7
+ /**
8
+ * The PoE2 exchange ratios module - the only PoE2 endpoint poe.watch exposes.
9
+ * @type {Poe2ExchangeModule}
10
+ */
11
+ exchange: Poe2ExchangeModule;
12
+ /**
13
+ * Creates a new instance of Poe2WatchAPI.
14
+ * @param {string} league - The league for which the API should be initialized.
15
+ */
16
+ constructor(league: string);
17
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Poe2WatchAPI = void 0;
7
+ const Poe2ExchangeModule_1 = __importDefault(require("./modules/poe.watch/poe2/Poe2ExchangeModule"));
8
+ /**
9
+ * Represents an API for interacting with poe.watch's Path of Exile 2 support.
10
+ * @class
11
+ */
12
+ class Poe2WatchAPI {
13
+ /**
14
+ * The PoE2 exchange ratios module - the only PoE2 endpoint poe.watch exposes.
15
+ * @type {Poe2ExchangeModule}
16
+ */
17
+ exchange;
18
+ /**
19
+ * Creates a new instance of Poe2WatchAPI.
20
+ * @param {string} league - The league for which the API should be initialized.
21
+ */
22
+ constructor(league) {
23
+ this.exchange = new Poe2ExchangeModule_1.default(league);
24
+ }
25
+ }
26
+ exports.Poe2WatchAPI = Poe2WatchAPI;
@@ -6,10 +6,24 @@ export declare class Utils {
6
6
  constructor();
7
7
  /**
8
8
  * Fetches the list of leagues for the game.
9
+ * @remarks PoE1-only, sourced from poe.watch. See getPoe1Leagues()/getPoe2Leagues()
10
+ * for poe.ninja-sourced leagues, including PoE2.
9
11
  * @returns {string[]} The array of league names.
10
12
  * @throws {Error} If there's an error fetching the leagues.
11
13
  */
12
14
  getLeagues(): Promise<string[]>;
15
+ /**
16
+ * Fetches the list of PoE1 league names from poe.ninja.
17
+ * @returns {string[]} The array of league names.
18
+ * @throws {Error} If there's an error fetching the leagues.
19
+ */
20
+ getPoe1Leagues(): Promise<string[]>;
21
+ /**
22
+ * Fetches the list of PoE2 league names from poe.ninja.
23
+ * @returns {string[]} The array of league names.
24
+ * @throws {Error} If there's an error fetching the leagues.
25
+ */
26
+ getPoe2Leagues(): Promise<string[]>;
13
27
  /**
14
28
  * Filters properties of objects in an array based on the specified properties.
15
29
  *
package/dist/lib/Utils.js CHANGED
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Utils = void 0;
7
7
  const getLeagues_1 = __importDefault(require("./modules/utils/getLeagues"));
8
+ const getNinjaLeagues_1 = __importDefault(require("./modules/utils/getNinjaLeagues"));
8
9
  const propertyFilter_1 = __importDefault(require("./mainfunctions/propertyFilter"));
9
10
  /**
10
11
  * A utility class.
@@ -14,16 +15,29 @@ class Utils {
14
15
  constructor() { }
15
16
  /**
16
17
  * Fetches the list of leagues for the game.
18
+ * @remarks PoE1-only, sourced from poe.watch. See getPoe1Leagues()/getPoe2Leagues()
19
+ * for poe.ninja-sourced leagues, including PoE2.
17
20
  * @returns {string[]} The array of league names.
18
21
  * @throws {Error} If there's an error fetching the leagues.
19
22
  */
20
23
  async getLeagues() {
21
- try {
22
- return await (0, getLeagues_1.default)();
23
- }
24
- catch (error) {
25
- throw new Error(`Error fetching data Leagues: ${error.message}`);
26
- }
24
+ return await (0, getLeagues_1.default)();
25
+ }
26
+ /**
27
+ * Fetches the list of PoE1 league names from poe.ninja.
28
+ * @returns {string[]} The array of league names.
29
+ * @throws {Error} If there's an error fetching the leagues.
30
+ */
31
+ async getPoe1Leagues() {
32
+ return await (0, getNinjaLeagues_1.default)("poe1");
33
+ }
34
+ /**
35
+ * Fetches the list of PoE2 league names from poe.ninja.
36
+ * @returns {string[]} The array of league names.
37
+ * @throws {Error} If there's an error fetching the leagues.
38
+ */
39
+ async getPoe2Leagues() {
40
+ return await (0, getNinjaLeagues_1.default)("poe2");
27
41
  }
28
42
  /**
29
43
  * Filters properties of objects in an array based on the specified properties.
@@ -34,12 +48,7 @@ class Utils {
34
48
  * @throws {Error} If there's an error filtering the properties.
35
49
  */
36
50
  async filterProperties(data, properties) {
37
- try {
38
- return (0, propertyFilter_1.default)(data, properties);
39
- }
40
- catch (error) {
41
- throw new Error(`Error fetching data Leagues: ${error.message}`);
42
- }
51
+ return (0, propertyFilter_1.default)(data, properties);
43
52
  }
44
53
  }
45
54
  exports.Utils = Utils;
@@ -16,7 +16,10 @@ class CustomError extends Error {
16
16
  super(message);
17
17
  this.statusCode = statusCode;
18
18
  this.name = this.constructor.name;
19
- Error.captureStackTrace(this, this.constructor);
19
+ // Error.captureStackTrace is V8-only (missing on e.g. bun/JavaScriptCore)
20
+ if (typeof Error.captureStackTrace === "function") {
21
+ Error.captureStackTrace(this, this.constructor);
22
+ }
20
23
  }
21
24
  }
22
25
  exports.default = CustomError;
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const ValidationError_js_1 = __importDefault(require("../errors/ValidationError.js"));
6
+ exports.default = filterProperties;
7
+ const ValidationError_1 = __importDefault(require("../errors/ValidationError"));
7
8
  /**
8
9
  * Filters properties of objects in an array based on the specified properties.
9
10
  * @param {Record<string, any> []} data The array of objects to filter.
@@ -13,12 +14,12 @@ const ValidationError_js_1 = __importDefault(require("../errors/ValidationError.
13
14
  function filterProperties(data, requestedProperties) {
14
15
  // Validate input first
15
16
  if (!Array.isArray(data)) {
16
- throw new ValidationError_js_1.default("Input data must be an array", 400, {
17
+ throw new ValidationError_1.default("Input data must be an array", 400, {
17
18
  providedType: typeof data,
18
19
  });
19
20
  }
20
21
  if (!Array.isArray(requestedProperties)) {
21
- throw new ValidationError_js_1.default("requestedProperties must be an array", 400, {
22
+ throw new ValidationError_1.default("requestedProperties must be an array", 400, {
22
23
  providedType: typeof requestedProperties,
23
24
  });
24
25
  }
@@ -29,12 +30,8 @@ function filterProperties(data, requestedProperties) {
29
30
  if (Object.prototype.hasOwnProperty.call(item, prop)) {
30
31
  itemResult[prop] = item[prop];
31
32
  }
32
- else {
33
- console.warn(`Property not found: ${prop}`);
34
- }
35
33
  });
36
34
  result.push(itemResult);
37
35
  });
38
36
  return result;
39
37
  }
40
- exports.default = filterProperties;
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for retrieving currency data from the PoeNinja API.
4
4
  */