poe-api-manager 1.2.12 → 1.2.13

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 (80) hide show
  1. package/Changelog.md +3 -0
  2. package/package.json +2 -2
  3. package/src/index.ts +0 -9
  4. package/src/lib/NinjaAPI.ts +0 -27
  5. package/src/lib/Utils.ts +0 -39
  6. package/src/lib/WatchAPI.ts +0 -19
  7. package/src/lib/modules/AbstractClass/PoeNinja.ts +0 -37
  8. package/src/lib/modules/AbstractClass/PoeWatch.ts +0 -26
  9. package/src/lib/modules/Interfaces/IPoeNinja.ts +0 -13
  10. package/src/lib/modules/Interfaces/IPoeWatch.ts +0 -13
  11. package/src/lib/modules/mainfunctions/propertyFilter.ts +0 -25
  12. package/src/lib/modules/poe.ninja/currencyView/CurrencyViewModule.ts +0 -26
  13. package/src/lib/modules/poe.ninja/currencyView/currencySubModules/CurrencySubModules.ts +0 -7
  14. package/src/lib/modules/poe.ninja/currencyView/currencySubModules/submodules/CurrencyModule.ts +0 -33
  15. package/src/lib/modules/poe.ninja/currencyView/currencySubModules/submodules/FragmentModule.ts +0 -18
  16. package/src/lib/modules/poe.ninja/fetch/fetchData.ts +0 -51
  17. package/src/lib/modules/poe.ninja/fetch/merge/mergeData.ts +0 -35
  18. package/src/lib/modules/poe.ninja/func/getData.ts +0 -30
  19. package/src/lib/modules/poe.ninja/func/getQuickCurrency.ts +0 -30
  20. package/src/lib/modules/poe.ninja/func/urlGenerator.ts +0 -10
  21. package/src/lib/modules/poe.ninja/itemView/ItemViewModule.ts +0 -188
  22. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/itemSubModules.ts +0 -61
  23. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/AllflameEmberModule.ts +0 -18
  24. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BaseTypeModule.ts +0 -19
  25. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BeastModule.ts +0 -20
  26. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BlightRavagedMapModule.ts +0 -19
  27. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BlightedMapModule.ts +0 -19
  28. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ClusterJewelModule.ts +0 -19
  29. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/CoffinModule.ts +0 -18
  30. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/DeliriumOrbsModule.ts +0 -18
  31. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/DivinationCardModule.ts +0 -18
  32. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/EssenceModule.ts +0 -18
  33. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/FossilModule.ts +0 -18
  34. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/HelmetEnchantModule.ts +0 -18
  35. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/IncubatorModule.ts +0 -18
  36. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/InvitationModule.ts +0 -18
  37. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/MapModule.ts +0 -18
  38. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/MemoryModule.ts +0 -18
  39. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/OilModule.ts +0 -18
  40. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/OmenModule.ts +0 -18
  41. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ResonatorModule.ts +0 -18
  42. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ScarabModule.ts +0 -18
  43. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/SkillGemModule.ts +0 -18
  44. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueAccessoryModule.ts +0 -18
  45. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueArmourModule.ts +0 -18
  46. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueFlaskModule.ts +0 -18
  47. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueJewelModule.ts +0 -18
  48. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueMapModule.ts +0 -18
  49. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueRelicModule.ts +0 -18
  50. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueWeaponModule.ts +0 -18
  51. package/src/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/VialsModule.ts +0 -18
  52. package/src/lib/modules/poe.watch/WatchViewModule.ts +0 -141
  53. package/src/lib/modules/poe.watch/allModules/Modules.ts +0 -46
  54. package/src/lib/modules/poe.watch/allModules/fetch/watchFetch.ts +0 -30
  55. package/src/lib/modules/poe.watch/allModules/func/WatchUrlGenerator.ts +0 -10
  56. package/src/lib/modules/poe.watch/allModules/func/getCategory.ts +0 -34
  57. package/src/lib/modules/poe.watch/allModules/func/getData.ts +0 -30
  58. package/src/lib/modules/poe.watch/allModules/subModules/AccessoryModule.ts +0 -34
  59. package/src/lib/modules/poe.watch/allModules/subModules/ArmourModule.ts +0 -34
  60. package/src/lib/modules/poe.watch/allModules/subModules/BaseModule.ts +0 -34
  61. package/src/lib/modules/poe.watch/allModules/subModules/BeastModule.ts +0 -17
  62. package/src/lib/modules/poe.watch/allModules/subModules/CurrencyModule.ts +0 -18
  63. package/src/lib/modules/poe.watch/allModules/subModules/DeliriumOrbModule.ts +0 -17
  64. package/src/lib/modules/poe.watch/allModules/subModules/DivsModule.ts +0 -17
  65. package/src/lib/modules/poe.watch/allModules/subModules/EssenceModule.ts +0 -17
  66. package/src/lib/modules/poe.watch/allModules/subModules/FlaskModule.ts +0 -17
  67. package/src/lib/modules/poe.watch/allModules/subModules/FossilModule.ts +0 -17
  68. package/src/lib/modules/poe.watch/allModules/subModules/FragmentModule.ts +0 -17
  69. package/src/lib/modules/poe.watch/allModules/subModules/GemModule.ts +0 -34
  70. package/src/lib/modules/poe.watch/allModules/subModules/InscribedModule.ts +0 -17
  71. package/src/lib/modules/poe.watch/allModules/subModules/InvitationModule.ts +0 -17
  72. package/src/lib/modules/poe.watch/allModules/subModules/JewelModule.ts +0 -17
  73. package/src/lib/modules/poe.watch/allModules/subModules/MapModule.ts +0 -17
  74. package/src/lib/modules/poe.watch/allModules/subModules/OilModule.ts +0 -17
  75. package/src/lib/modules/poe.watch/allModules/subModules/ScarabModule.ts +0 -18
  76. package/src/lib/modules/poe.watch/allModules/subModules/SextantModule.ts +0 -17
  77. package/src/lib/modules/poe.watch/allModules/subModules/UniqueMapsModule.ts +0 -17
  78. package/src/lib/modules/poe.watch/allModules/subModules/WeaponModule.ts +0 -35
  79. package/src/lib/modules/utils/fetchData/fetchData.ts +0 -22
  80. package/src/lib/modules/utils/getLeagues.ts +0 -26
@@ -1,18 +0,0 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
2
-
3
- /**
4
- * Represents a module for handling unique accessories.
5
- */
6
- class UniqueAccessoryModule extends PoeNinja {
7
- /**
8
- * Creates an instance of UniqueAccessoryModule.
9
- * @param league - The league name.
10
- * @param typeName - The type name.
11
- */
12
- constructor(league: string, typeName: string) {
13
- const type: string = "UniqueAccessory";
14
- super(league, typeName, type);
15
- }
16
- }
17
-
18
- export default UniqueAccessoryModule;
@@ -1,18 +0,0 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
2
-
3
- /**
4
- * Represents a module for handling unique armours.
5
- */
6
- class UniqueArmourModule extends PoeNinja {
7
- /**
8
- * Creates an instance of UniqueArmourModule.
9
- * @param league - The league name.
10
- * @param typeName - The type name.
11
- */
12
- constructor(league: string, typeName: string) {
13
- const type: string = "UniqueArmour";
14
- super(league, typeName, type);
15
- }
16
- }
17
-
18
- export default UniqueArmourModule;
@@ -1,18 +0,0 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
2
-
3
- /**
4
- * Represents a module for handling unique flasks.
5
- */
6
- class UniqueFlaskModule extends PoeNinja {
7
- /**
8
- * Creates an instance of UniqueFlaskModule.
9
- * @param league - The league name.
10
- * @param typeName - The type name.
11
- */
12
- constructor(league: string, typeName: string) {
13
- const type: string = "UniqueFlask";
14
- super(league, typeName, type);
15
- }
16
- }
17
-
18
- export default UniqueFlaskModule;
@@ -1,18 +0,0 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
2
-
3
- /**
4
- * Represents a module for handling unique jewels.
5
- */
6
- class UniqueJewelModule extends PoeNinja {
7
- /**
8
- * Creates an instance of UniqueJewelModule.
9
- * @param league - The league name.
10
- * @param typeName - The type name.
11
- */
12
- constructor(league: string, typeName: string) {
13
- const type: string = "UniqueJewel";
14
- super(league, typeName, type);
15
- }
16
- }
17
-
18
- export default UniqueJewelModule;
@@ -1,18 +0,0 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
2
-
3
- /**
4
- * Represents a module for handling unique maps.
5
- */
6
- class UniqueMapModule extends PoeNinja {
7
- /**
8
- * Creates an instance of UniqueMapModule.
9
- * @param league - The league name.
10
- * @param typeName - The type name.
11
- */
12
- constructor(league: string, typeName: string) {
13
- const type: string = "UniqueMap";
14
- super(league, typeName, type);
15
- }
16
- }
17
-
18
- export default UniqueMapModule;
@@ -1,18 +0,0 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
2
-
3
- /**
4
- * Represents a module for handling unique relics.
5
- */
6
- class UniqueRelicModule extends PoeNinja {
7
- /**
8
- * Creates an instance of UniqueRelicModule.
9
- * @param league - The league name.
10
- * @param typeName - The type name.
11
- */
12
- constructor(league: string, typeName: string) {
13
- const type: string = "UniqueRelic";
14
- super(league, typeName, type);
15
- }
16
- }
17
-
18
- export default UniqueRelicModule;
@@ -1,18 +0,0 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
2
-
3
- /**
4
- * Represents a module for handling unique weapons.
5
- */
6
- class UniqueWeaponModule extends PoeNinja {
7
- /**
8
- * Creates an instance of UniqueWeaponModule.
9
- * @param league - The league name.
10
- * @param typeName - The type name.
11
- */
12
- constructor(league: string, typeName: string) {
13
- const type: string = "UniqueWeapon";
14
- super(league, typeName, type);
15
- }
16
- }
17
-
18
- export default UniqueWeaponModule;
@@ -1,18 +0,0 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
2
-
3
- /**
4
- * Represents a module for handling vials.
5
- */
6
- class VialsModule extends PoeNinja {
7
- /**
8
- * Creates an instance of VialsModule.
9
- * @param league - The league name.
10
- * @param typeName - The type name.
11
- */
12
- constructor(league: string, typeName: string) {
13
- const type: string = "Vial";
14
- super(league, typeName, type);
15
- }
16
- }
17
-
18
- export default VialsModule;
@@ -1,141 +0,0 @@
1
- import { CurrencyModule, AccessoryModule, ArmourModule, BaseModule, BeastModule, DeliriumOrbModule, DivsModule, EssenceModule, FossilModule, FragmentModule, MapModule, FlaskModule, JewelModule, GemModule, InscribedModule, InvitationModule, OilModule, ScarabModule, SextantModule, UniqueMapsModule, WeaponModule } from "./allModules/Modules";
2
-
3
- /**
4
- * Represents a module for fetching data related to Watchstones and Watchstone Regions.
5
- */
6
- export class WatchWievModule {
7
- /**
8
- * Module for fetching data related to Currency.
9
- */
10
- public currency: CurrencyModule;
11
-
12
- /**
13
- * Module for fetching data related to Accessories.
14
- */
15
- public accessory: AccessoryModule;
16
-
17
- /**
18
- * Module for fetching data related to Armour.
19
- */
20
- public armour: ArmourModule;
21
-
22
- /**
23
- * Module for fetching data related to Base.
24
- */
25
- public base: BaseModule;
26
-
27
- /**
28
- * Module for fetching data related to Beast.
29
- */
30
- public beast: BeastModule;
31
-
32
- /**
33
- * Module for fetching data related to DeliriumOrb.
34
- */
35
- //public deliriumOrb: DeliriumOrbModule;
36
-
37
- /**
38
- * Module for fetching data related to Divs.
39
- */
40
- //public divs: DivsModule;
41
-
42
- /**
43
- * Module for fetching data related to Essence.
44
- */
45
- public essence: EssenceModule;
46
-
47
- /**
48
- * Module for fetching data related to Fossil.
49
- */
50
- public fossil: FossilModule;
51
-
52
- /**
53
- * Module for fetching data related to Fragment.
54
- */
55
- public fragment: FragmentModule;
56
-
57
- /**
58
- * Module for fetching data related to Map.
59
- */
60
- public map: MapModule;
61
-
62
- /**
63
- * Module for fetching data related to Flask.
64
- */
65
- public flask: FlaskModule;
66
-
67
- /**
68
- * Module for fetching data related to Jewel.
69
- */
70
- public jewel: JewelModule;
71
-
72
- /**
73
- * Module for fetching data related to Gem.
74
- */
75
- public gem: GemModule;
76
-
77
- /**
78
- * Module for fetching data related to Inscribed.
79
- */
80
- //public inscribed: InscribedModule;
81
-
82
- /**
83
- * Module for fetching data related to Invitation.
84
- */
85
- public invitation: InvitationModule;
86
-
87
- /**
88
- * Module for fetching data related to Oil.
89
- */
90
- public oil: OilModule;
91
-
92
- /**
93
- * Module for fetching data related to Scarab.
94
- */
95
- public scarab: ScarabModule;
96
-
97
- /**
98
- * Module for fetching data related to Sextant.
99
- */
100
- public sextant: SextantModule;
101
-
102
- /**
103
- * Module for fetching data related to UniqueMaps.
104
- */
105
- //public uniqueMaps: UniqueMapsModule;
106
-
107
- /**
108
- * Module for fetching data related to Weapon.
109
- */
110
- public weapon: WeaponModule;
111
-
112
- /**
113
- * Creates an instance of WatchWievModule.
114
- * @param league - The league name to fetch data from.
115
- */
116
- constructor(league: string) {
117
- this.currency = new CurrencyModule(league);
118
- this.accessory = new AccessoryModule(league);
119
- this.armour = new ArmourModule(league);
120
- this.base = new BaseModule(league);
121
- this.beast = new BeastModule(league);
122
- //this.deliriumOrb = new DeliriumOrbModule(league);
123
- //this.divs = new DivsModule(league);
124
- this.essence = new EssenceModule(league);
125
- this.fossil = new FossilModule(league);
126
- this.fragment = new FragmentModule(league);
127
- this.map = new MapModule(league);
128
- this.flask = new FlaskModule(league);
129
- this.jewel = new JewelModule(league);
130
- this.gem = new GemModule(league);
131
- //this.inscribed = new InscribedModule(league);
132
- this.invitation = new InvitationModule(league);
133
- this.oil = new OilModule(league);
134
- this.scarab = new ScarabModule(league);
135
- this.sextant = new SextantModule(league);
136
- //this.uniqueMaps = new UniqueMapsModule(league);
137
- this.weapon = new WeaponModule(league);
138
- }
139
- }
140
-
141
- export default WatchWievModule;
@@ -1,46 +0,0 @@
1
- import CurrencyModule from "./subModules/CurrencyModule"
2
- import AccessoryModule from "./subModules/AccessoryModule"
3
- import ArmourModule from "./subModules/ArmourModule"
4
- import BaseModule from "./subModules/BaseModule"
5
- import BeastModule from "./subModules/BeastModule"
6
- import DeliriumOrbModule from "./subModules/DeliriumOrbModule"
7
- import DivsModule from "./subModules/DivsModule"
8
- import EssenceModule from "./subModules/EssenceModule"
9
- import FossilModule from "./subModules/FossilModule"
10
- import FragmentModule from "./subModules/FragmentModule"
11
- import MapModule from "./subModules/MapModule"
12
- import FlaskModule from "./subModules/FlaskModule"
13
- import JewelModule from "./subModules/JewelModule"
14
- import GemModule from "./subModules/GemModule"
15
- import InscribedModule from "./subModules/InscribedModule"
16
- import InvitationModule from "./subModules/InvitationModule"
17
- import OilModule from "./subModules/OilModule"
18
- import ScarabModule from "./subModules/ScarabModule"
19
- import SextantModule from "./subModules/SextantModule"
20
- import UniqueMapsModule from "./subModules/UniqueMapsModule"
21
- import WeaponModule from "./subModules/WeaponModule"
22
-
23
-
24
- export {
25
- CurrencyModule,
26
- AccessoryModule,
27
- ArmourModule,
28
- BaseModule,
29
- BeastModule,
30
- DeliriumOrbModule,
31
- DivsModule,
32
- EssenceModule,
33
- FossilModule,
34
- FragmentModule,
35
- MapModule,
36
- FlaskModule,
37
- JewelModule,
38
- GemModule,
39
- InscribedModule,
40
- InvitationModule,
41
- OilModule,
42
- ScarabModule,
43
- SextantModule,
44
- UniqueMapsModule,
45
- WeaponModule
46
- }
@@ -1,30 +0,0 @@
1
- import axios from "axios";
2
- import WatchUrlGenerator from "../func/WatchUrlGenerator";
3
-
4
- /**
5
- * Fetches data from the POE Watch API based on the provided query URL.
6
- * @param league - The game league for which to fetch currency data.
7
- * @param type - The type of data to fetch.
8
- * @returns - A Promise that resolves to the fetched data.
9
- * @throws - Throws an error if there is an issue with the API response or fetching data.
10
- */
11
- async function fetchData(league: string, type: string): Promise<object[]> {
12
- try {
13
- const url: string = WatchUrlGenerator(league, type);
14
- const response = await axios.get(url, {
15
- headers: {
16
- 'Accept-Encoding': 'identity',
17
- },
18
- });
19
-
20
- if (response.data) {
21
- return response.data;
22
- } else {
23
- throw new Error("Invalid response format from POE Watch API");
24
- }
25
- } catch (error) {
26
- throw new Error(`Error fetching data from poe.watch: ${(error as Error).message}`);
27
- }
28
- }
29
-
30
- export default fetchData;
@@ -1,10 +0,0 @@
1
- /**
2
- * Generates a URL based on league and type. poe.watch API is used.
3
- * @param {string} league - The league for which the URL is generated.
4
- * @param {string} type - The type of data for which the URL is generated.
5
- * @returns {string} - The generated URL.
6
- */
7
- export default function urlGenerator(league: string, type: string): string {
8
- return `https://api.poe.watch/get?category=${type}&league=${league}`;
9
- }
10
-
@@ -1,34 +0,0 @@
1
- import fetchData from "../fetch/watchFetch";
2
-
3
- /**
4
- * Fetches data based on the provided query URL and filters it by category name.
5
- * @param league - The league to fetch the data from.
6
- * @param type - The type of data to fetch.
7
- * @param categoryName - The name of the category to filter the data by.
8
- * @returns A promise that resolves to an array of filtered data items.
9
- * @throws Throws an error if category name is not provided or if there is an issue fetching or filtering the data.
10
- */
11
- async function getCategory(league: string, type: string, categoryName: string): Promise<object[]>{
12
- try {
13
- const fetchedData: object[] = await fetchData(league ,type);
14
-
15
- // Validate category name
16
- if (!categoryName && categoryName !== "0") {
17
- throw new Error("Category name is required.");
18
- }
19
-
20
- // Filter data by category name
21
- const filteredData: object[] = fetchedData.filter((item: any) => item.group === categoryName);
22
-
23
- // Check if filtered data is empty
24
- if (filteredData.length === 0) {
25
- throw new Error(`No data found for category: ${categoryName}`);
26
- }
27
-
28
- return filteredData;
29
- } catch (error) {
30
- throw new Error(`Error fetching or filtering data for category: ${(error as Error).message}`);
31
- }
32
- };
33
-
34
- export default getCategory;
@@ -1,30 +0,0 @@
1
- import fetchData from "../fetch/watchFetch";
2
- import filterProperties from "../../../mainfunctions/propertyFilter";
3
-
4
- /**
5
- * Retrieves data from the specified URL, optionally filtering based on requested properties.
6
- *
7
- * @param league - The league from which the data will be fetched.
8
- * @param type - The type of data to be fetched.
9
- * @param requestedProperties - An optional array of property names to filter the data.
10
- * @returns - A promise that resolves to the fetched or filtered data.
11
- * @throws - Throws an error if there is an issue fetching or filtering the data.
12
- */
13
- async function getData(league: string, type: string, requestedProperties?: string[]): Promise<object[]> {
14
- try {
15
- const fetchedData: object[] = await fetchData(league, type);
16
-
17
- // If requestedProperties are specified, filter the data based on those properties
18
- if (requestedProperties && requestedProperties.length > 0) {
19
- const result: object[] = filterProperties(fetchedData, requestedProperties);
20
- return result;
21
- } else {
22
- // If no specific properties are requested, return the entire fetched data
23
- return fetchedData;
24
- }
25
- } catch (error) {
26
- throw new Error(`Error fetching data: ${(error as Error).message}`);
27
- }
28
- }
29
-
30
- export default getData;
@@ -1,34 +0,0 @@
1
- import getCategory from "../func/getCategory";
2
- import PoeWatch from "../../../AbstractClass/PoeWatch";
3
-
4
- /**
5
- * Subclass of PoeWatch for accessing accessory data.
6
- */
7
- class AccessoryModule extends PoeWatch {
8
- /**
9
- * Creates a new instance of AccessoryModule.
10
- * @param {string} league - The league from which the data will be fetched.
11
- */
12
- constructor(league: string) {
13
- const type: string = "accessory";
14
- super(league, type);
15
- }
16
-
17
- /**
18
- * Retrieves category data for accessories.
19
- * @async
20
- * @param categoryName - The name of the category to retrieve.
21
- * * Possible values: "amulets", "rings", "belts", "quivers".
22
- * @returns - A Promise containing data for the specified category.
23
- * @throws - Throws errors encountered while fetching data.
24
- */
25
- async getCategory(categoryName: string): Promise<object[]> {
26
- try {
27
- return await getCategory(this.league, this.type, categoryName);
28
- } catch (error) {
29
- throw new Error(`Error fetching Accessory data: ${(error as Error).message}`);
30
- }
31
- }
32
- }
33
-
34
- export default AccessoryModule;
@@ -1,34 +0,0 @@
1
- import getCategory from "../func/getCategory";
2
- import PoeWatch from "../../../AbstractClass/PoeWatch";
3
-
4
- /**
5
- * Subclass of PoeWatch for accessing armour data.
6
- */
7
- class ArmourModule extends PoeWatch {
8
- /**
9
- * Creates a new instance of ArmourModule.
10
- * @param {string} league - The league from which the data will be fetched.
11
- */
12
- constructor(league: string) {
13
- const type: string = "armour";
14
- super(league, type);
15
- }
16
-
17
- /**
18
- * Retrieves category data for armour.
19
- * @async
20
- * @param categoryName - The name of the category to retrieve.
21
- * * Possible values: "chest", "bodyarmours", "shield", "boots", "gloves", "shields", "helmets", "quiver".
22
- * @returns - A Promise containing data for the specified category.
23
- * @throws - Throws errors encountered while fetching data.
24
- */
25
- async getCategory(categoryName: string): Promise<object[]> {
26
- try {
27
- return await getCategory(this.league, this.type, categoryName);
28
- } catch (error) {
29
- throw new Error(`Error fetching Accessory data: ${(error as Error).message}`);
30
- }
31
- }
32
- }
33
-
34
- export default ArmourModule;
@@ -1,34 +0,0 @@
1
- import getCategory from "../func/getCategory";
2
- import PoeWatch from "../../../AbstractClass/PoeWatch";
3
-
4
- /**
5
- * Subclass of PoeWatch for accessing base data.
6
- */
7
- class BaseModule extends PoeWatch {
8
- /**
9
- * Creates a new instance of BaseModule.
10
- * @param league - The league from which the data will be fetched.
11
- */
12
- constructor(league: string) {
13
- const type: string = "base";
14
- super(league, type);
15
- }
16
-
17
- /**
18
- * Retrieves category data for base.
19
- * @async
20
- * @param categoryName - The name of the category to retrieve.
21
- * * Possible values: "armour", "weapons", "accessories".
22
- * @returns - A Promise containing data for the specified category.
23
- * @throws - Throws errors encountered while fetching data.
24
- */
25
- async getCategory(categoryName: string): Promise<object[]> {
26
- try {
27
- return await getCategory(this.league, this.type, categoryName);
28
- } catch (error) {
29
- throw new Error(`Error fetching Accessory data: ${(error as Error).message}`);
30
- }
31
- }
32
- }
33
-
34
- export default BaseModule;
@@ -1,17 +0,0 @@
1
- import PoeWatch from "../../../AbstractClass/PoeWatch";
2
-
3
- /**
4
- * Subclass of PoeWatch for accessing beast data.
5
- */
6
- class BeastModule extends PoeWatch {
7
- /**
8
- * Creates a new instance of BeastModule.
9
- * @param league - The league from which the data will be fetched.
10
- */
11
- constructor(league: string) {
12
- const type: string = "beast";
13
- super(league, type);
14
- }
15
- }
16
-
17
- export default BeastModule;
@@ -1,18 +0,0 @@
1
- import PoeWatch from "../../../AbstractClass/PoeWatch";
2
-
3
- /**
4
- * Subclass of PoeWatch for accessing currency data.
5
- */
6
- class CurrencyModule extends PoeWatch {
7
-
8
- /**
9
- * Creates a new instance of CurrencyModule.
10
- * @param league - The league from which the data will be fetched.
11
- */
12
- constructor(league: string) {
13
- const type: string = "currency";
14
- super(league, type);
15
- }
16
- }
17
-
18
- export default CurrencyModule;
@@ -1,17 +0,0 @@
1
- import PoeWatch from "../../../AbstractClass/PoeWatch";
2
-
3
- /**
4
- * Subclass of PoeWatch for accessing deliriumOrb data.
5
- */
6
- class DeliriumOrbModule extends PoeWatch {
7
- /**
8
- * Creates a new instance of DeliriumOrbModule.
9
- * @param league - The league from which the data will be fetched.
10
- */
11
- constructor(league: string) {
12
- const type: string = "deliriumOrb";
13
- super(league, type);
14
- }
15
- }
16
-
17
- export default DeliriumOrbModule;
@@ -1,17 +0,0 @@
1
- import PoeWatch from "../../../AbstractClass/PoeWatch";
2
-
3
- /**
4
- * Subclass of PoeWatch for accessing div data.
5
- */
6
- class DivsModule extends PoeWatch {
7
- /**
8
- * Creates a new instance of DivsModule.
9
- * @param league - The league from which the data will be fetched.
10
- */
11
- constructor(league: string) {
12
- const type: string = "div";
13
- super(league, type);
14
- }
15
- }
16
-
17
- export default DivsModule;
@@ -1,17 +0,0 @@
1
- import PoeWatch from "../../../AbstractClass/PoeWatch";
2
-
3
- /**
4
- * Subclass of PoeWatch for accessing esssence data.
5
- */
6
- class EssenceModule extends PoeWatch {
7
- /**
8
- * Creates a new instance of EssenceModule.
9
- * @param league - The league from which the data will be fetched.
10
- */
11
- constructor(league: string) {
12
- const type: string = "esssence";
13
- super(league, type);
14
- }
15
- }
16
-
17
- export default EssenceModule;
@@ -1,17 +0,0 @@
1
- import PoeWatch from "../../../AbstractClass/PoeWatch";
2
-
3
- /**
4
- * Subclass of PoeWatch for accessing flask data.
5
- */
6
- class FlaskModule extends PoeWatch {
7
- /**
8
- * Creates a new instance of FlaskModule.
9
- * @param league - The league from which the data will be fetched.
10
- */
11
- constructor(league: string) {
12
- const type: string = "flask";
13
- super(league, type);
14
- }
15
- }
16
-
17
- export default FlaskModule;