poe-api-manager 0.2.8 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Changelog.md +12 -2
- package/README.md +31 -9
- package/index.js +4 -0
- package/lib/Utils.js +41 -0
- package/lib/WatchAPI.js +1 -33
- package/lib/modules/poe.ninja/currency/CurrencyBaseClass.js +37 -0
- package/lib/modules/poe.ninja/currency/CurrencyWievModule.js +2 -27
- package/lib/modules/poe.ninja/currency/currencySubmodules/subModules/CurrencyModule.js +8 -52
- package/lib/modules/poe.ninja/currency/currencySubmodules/subModules/FragmentModule.js +8 -52
- package/lib/modules/poe.ninja/currency/{currencySubmodules/functions → methods}/getData.js +2 -2
- package/lib/modules/poe.ninja/item/ItemBaseClass.js +64 -0
- package/lib/modules/poe.ninja/item/ItemWievModule.js +27 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/BaseTypeModule.js +8 -48
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/BeastModule.js +8 -48
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/BlightRavagedMapModule.js +9 -54
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/BlightedMapModule.js +7 -49
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/ClusterJewelModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/DeliriumOrbsModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/DivinationCardModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/EssenceModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/FossilModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/HelmetEnchantModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/IncubatorModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/InvitationModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/MapModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/MemoryModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/OilModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/OmenModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/ResonatorModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/ScarabModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/SkillGemModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueAccessoryModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueArmourModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueFlaskModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueJewelModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueMapModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueRelicModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueWeaponModule.js +7 -52
- package/lib/modules/poe.ninja/item/itemSubmodules/subModules/VialsModule.js +7 -52
- package/lib/modules/poe.ninja/item/{itemSubmodules/functions → methods}/getData.js +2 -2
- package/lib/modules/poe.watch/allModules/WatchBaseClass.js +45 -0
- package/lib/modules/poe.watch/allModules/fetch/fetch.js +1 -4
- package/lib/modules/poe.watch/allModules/submodules/AccessoryModule.js +19 -62
- package/lib/modules/poe.watch/allModules/submodules/ArmourModule.js +19 -60
- package/lib/modules/poe.watch/allModules/submodules/BaseModule.js +19 -59
- package/lib/modules/poe.watch/allModules/submodules/BeastModule.js +13 -42
- package/lib/modules/poe.watch/allModules/submodules/CurrencyModule.js +13 -43
- package/lib/modules/poe.watch/allModules/submodules/DeliriumOrbModule.js +20 -42
- package/lib/modules/poe.watch/allModules/submodules/DivsModule.js +14 -43
- package/lib/modules/poe.watch/allModules/submodules/EssenceModule.js +13 -42
- package/lib/modules/poe.watch/allModules/submodules/FlaskModule.js +13 -42
- package/lib/modules/poe.watch/allModules/submodules/FossilModule.js +13 -42
- package/lib/modules/poe.watch/allModules/submodules/FragmentModule.js +13 -42
- package/lib/modules/poe.watch/allModules/submodules/GemModule.js +19 -61
- package/lib/modules/poe.watch/allModules/submodules/InscribedModule.js +13 -44
- package/lib/modules/poe.watch/allModules/submodules/InvitationModule.js +13 -42
- package/lib/modules/poe.watch/allModules/submodules/JewelModule.js +13 -42
- package/lib/modules/poe.watch/allModules/submodules/MapModule.js +13 -42
- package/lib/modules/poe.watch/allModules/submodules/OilModule.js +13 -42
- package/lib/modules/poe.watch/allModules/submodules/ScarabModule.js +13 -42
- package/lib/modules/poe.watch/allModules/submodules/SextantModule.js +13 -42
- package/lib/modules/poe.watch/allModules/submodules/UniqueMapsModule.js +13 -42
- package/lib/modules/poe.watch/allModules/submodules/WeaponModule.js +19 -59
- package/lib/modules/poe.watch/allModules/watchUrlGenerator/urlGenerator.js +9 -0
- package/lib/modules/utils/functions/fetch/fetch.js +22 -0
- package/lib/modules/utils/getLeagues.js +24 -0
- package/package.json +1 -1
- package/lib/config/poeNinja/url.js +0 -12
- package/lib/config/poeWatch/url.js +0 -12
- /package/lib/modules/poe.watch/allModules/{functions → methods}/getCategory.js +0 -0
- /package/lib/modules/poe.watch/allModules/{functions → methods}/getData.js +0 -0
|
@@ -1,60 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const ItemBaseClass = require("../../ItemBaseClass");
|
|
3
2
|
/**
|
|
4
|
-
* Represents a module for
|
|
5
|
-
*
|
|
6
|
-
* @class
|
|
3
|
+
* Represents a module for handling essences.
|
|
4
|
+
* @extends ItemBaseClass
|
|
7
5
|
*/
|
|
8
|
-
class EssenceModule {
|
|
9
|
-
/**
|
|
10
|
-
* The URL for fetching data.
|
|
11
|
-
*
|
|
12
|
-
* @private
|
|
13
|
-
* @type {string}
|
|
14
|
-
*/
|
|
15
|
-
#url;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The type of data (Essence in this case).
|
|
19
|
-
*
|
|
20
|
-
* @private
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
#type;
|
|
24
|
-
|
|
6
|
+
class EssenceModule extends ItemBaseClass {
|
|
25
7
|
/**
|
|
26
8
|
* Creates an instance of EssenceModule.
|
|
27
|
-
*
|
|
28
|
-
* @param {string} url - The URL to fetch data from.
|
|
29
|
-
*/
|
|
30
|
-
constructor(url) {
|
|
31
|
-
this.#url = url;
|
|
32
|
-
this.#type = "Essence";
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Asynchronously retrieves data based on the specified properties.
|
|
37
|
-
*
|
|
38
|
-
* @async
|
|
39
|
-
* @param {Array<string>} requestedProperties - An array of properties to retrieve.
|
|
40
|
-
* @returns {Promise<Object>} A promise that resolves to the retrieved data.
|
|
9
|
+
* @param {string} league - The league name.
|
|
41
10
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Calls the getData function to fetch Essence data.
|
|
46
|
-
*
|
|
47
|
-
* @type {Promise<Array<Object>>}
|
|
48
|
-
*/
|
|
49
|
-
return getData(this.#url, this.#type, requestedProperties);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
/**
|
|
52
|
-
* Throws an error if there's an issue fetching or processing the Essence data.
|
|
53
|
-
*
|
|
54
|
-
* @throws {Error}
|
|
55
|
-
*/
|
|
56
|
-
throw new Error(`Error fetching Essence data: ${error.message}`);
|
|
57
|
-
}
|
|
11
|
+
constructor(league) {
|
|
12
|
+
super(league, "Essence");
|
|
58
13
|
}
|
|
59
14
|
}
|
|
60
15
|
|
|
@@ -1,60 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const ItemBaseClass = require("../../ItemBaseClass");
|
|
3
2
|
/**
|
|
4
|
-
* Represents a module for
|
|
5
|
-
*
|
|
6
|
-
* @class
|
|
3
|
+
* Represents a module for handling fossils.
|
|
4
|
+
* @extends ItemBaseClass
|
|
7
5
|
*/
|
|
8
|
-
class FossilModule {
|
|
9
|
-
/**
|
|
10
|
-
* The URL for fetching data.
|
|
11
|
-
*
|
|
12
|
-
* @private
|
|
13
|
-
* @type {string}
|
|
14
|
-
*/
|
|
15
|
-
#url;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The type of data (Fossil in this case).
|
|
19
|
-
*
|
|
20
|
-
* @private
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
#type;
|
|
24
|
-
|
|
6
|
+
class FossilModule extends ItemBaseClass {
|
|
25
7
|
/**
|
|
26
8
|
* Creates an instance of FossilModule.
|
|
27
|
-
*
|
|
28
|
-
* @param {string} url - The URL to fetch data from.
|
|
29
|
-
*/
|
|
30
|
-
constructor(url) {
|
|
31
|
-
this.#url = url;
|
|
32
|
-
this.#type = "Fossil";
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Asynchronously retrieves data based on the specified properties.
|
|
37
|
-
*
|
|
38
|
-
* @async
|
|
39
|
-
* @param {Array<string>} requestedProperties - An array of properties to retrieve.
|
|
40
|
-
* @returns {Promise<Object>} A promise that resolves to the retrieved data.
|
|
9
|
+
* @param {string} league - The league name.
|
|
41
10
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Calls the getData function to fetch Fossil data.
|
|
46
|
-
*
|
|
47
|
-
* @type {Promise<Array<Object>>}
|
|
48
|
-
*/
|
|
49
|
-
return getData(this.#url, this.#type, requestedProperties);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
/**
|
|
52
|
-
* Throws an error if there's an issue fetching or processing the Fossil data.
|
|
53
|
-
*
|
|
54
|
-
* @throws {Error}
|
|
55
|
-
*/
|
|
56
|
-
throw new Error(`Error fetching Fossil data: ${error.message}`);
|
|
57
|
-
}
|
|
11
|
+
constructor(league) {
|
|
12
|
+
super(league, "Fossil");
|
|
58
13
|
}
|
|
59
14
|
}
|
|
60
15
|
|
|
@@ -1,60 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const ItemBaseClass = require("../../ItemBaseClass");
|
|
3
2
|
/**
|
|
4
|
-
* Represents a module for
|
|
5
|
-
*
|
|
6
|
-
* @class
|
|
3
|
+
* Represents a module for handling helmet enchants.
|
|
4
|
+
* @extends ItemBaseClass
|
|
7
5
|
*/
|
|
8
|
-
class HelmetEnchantModule {
|
|
9
|
-
/**
|
|
10
|
-
* The URL for fetching data.
|
|
11
|
-
*
|
|
12
|
-
* @private
|
|
13
|
-
* @type {string}
|
|
14
|
-
*/
|
|
15
|
-
#url;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The type of data (HelmetEnchant in this case).
|
|
19
|
-
*
|
|
20
|
-
* @private
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
#type;
|
|
24
|
-
|
|
6
|
+
class HelmetEnchantModule extends ItemBaseClass {
|
|
25
7
|
/**
|
|
26
8
|
* Creates an instance of HelmetEnchantModule.
|
|
27
|
-
*
|
|
28
|
-
* @param {string} url - The URL to fetch data from.
|
|
29
|
-
*/
|
|
30
|
-
constructor(url) {
|
|
31
|
-
this.#url = url;
|
|
32
|
-
this.#type = "HelmetEnchant";
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Asynchronously retrieves data based on the specified properties.
|
|
37
|
-
*
|
|
38
|
-
* @async
|
|
39
|
-
* @param {Array<string>} requestedProperties - An array of properties to retrieve.
|
|
40
|
-
* @returns {Promise<Object>} A promise that resolves to the retrieved data.
|
|
9
|
+
* @param {string} league - The league name.
|
|
41
10
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Calls the getData function to fetch HelmetEnchant data.
|
|
46
|
-
*
|
|
47
|
-
* @type {Promise<Array<Object>>}
|
|
48
|
-
*/
|
|
49
|
-
return getData(this.#url, this.#type, requestedProperties);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
/**
|
|
52
|
-
* Throws an error if there's an issue fetching or processing the HelmetEnchant data.
|
|
53
|
-
*
|
|
54
|
-
* @throws {Error}
|
|
55
|
-
*/
|
|
56
|
-
throw new Error(`Error fetching HelmetEnchant data: ${error.message}`);
|
|
57
|
-
}
|
|
11
|
+
constructor(league) {
|
|
12
|
+
super(league, "HelmetEnchant");
|
|
58
13
|
}
|
|
59
14
|
}
|
|
60
15
|
|
|
@@ -1,60 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const ItemBaseClass = require("../../ItemBaseClass");
|
|
3
2
|
/**
|
|
4
|
-
* Represents a module for
|
|
5
|
-
*
|
|
6
|
-
* @class
|
|
3
|
+
* Represents a module for handling incubators.
|
|
4
|
+
* @extends ItemBaseClass
|
|
7
5
|
*/
|
|
8
|
-
class IncubatorModule {
|
|
9
|
-
/**
|
|
10
|
-
* The URL for fetching data.
|
|
11
|
-
*
|
|
12
|
-
* @private
|
|
13
|
-
* @type {string}
|
|
14
|
-
*/
|
|
15
|
-
#url;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The type of data (Incubator in this case).
|
|
19
|
-
*
|
|
20
|
-
* @private
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
#type;
|
|
24
|
-
|
|
6
|
+
class IncubatorModule extends ItemBaseClass {
|
|
25
7
|
/**
|
|
26
8
|
* Creates an instance of IncubatorModule.
|
|
27
|
-
*
|
|
28
|
-
* @param {string} url - The URL to fetch data from.
|
|
29
|
-
*/
|
|
30
|
-
constructor(url) {
|
|
31
|
-
this.#url = url;
|
|
32
|
-
this.#type = "Incubator";
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Asynchronously retrieves data based on the specified properties.
|
|
37
|
-
*
|
|
38
|
-
* @async
|
|
39
|
-
* @param {Array<string>} requestedProperties - An array of properties to retrieve.
|
|
40
|
-
* @returns {Promise<Object>} A promise that resolves to the retrieved data.
|
|
9
|
+
* @param {string} league - The league name.
|
|
41
10
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Calls the getData function to fetch Incubator data.
|
|
46
|
-
*
|
|
47
|
-
* @type {Promise<Array<Object>>}
|
|
48
|
-
*/
|
|
49
|
-
return getData(this.#url, this.#type, requestedProperties);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
/**
|
|
52
|
-
* Throws an error if there's an issue fetching or processing the Incubator data.
|
|
53
|
-
*
|
|
54
|
-
* @throws {Error}
|
|
55
|
-
*/
|
|
56
|
-
throw new Error(`Error fetching Incubator data: ${error.message}`);
|
|
57
|
-
}
|
|
11
|
+
constructor(league) {
|
|
12
|
+
super(league, "Incubator");
|
|
58
13
|
}
|
|
59
14
|
}
|
|
60
15
|
|
|
@@ -1,60 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const ItemBaseClass = require("../../ItemBaseClass");
|
|
3
2
|
/**
|
|
4
|
-
* Represents a module for
|
|
5
|
-
*
|
|
6
|
-
* @class
|
|
3
|
+
* Represents a module for handling invitations.
|
|
4
|
+
* @extends ItemBaseClass
|
|
7
5
|
*/
|
|
8
|
-
class InvitationModule {
|
|
9
|
-
/**
|
|
10
|
-
* The URL for fetching data.
|
|
11
|
-
*
|
|
12
|
-
* @private
|
|
13
|
-
* @type {string}
|
|
14
|
-
*/
|
|
15
|
-
#url;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The type of data (Invitation in this case).
|
|
19
|
-
*
|
|
20
|
-
* @private
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
#type;
|
|
24
|
-
|
|
6
|
+
class InvitationModule extends ItemBaseClass {
|
|
25
7
|
/**
|
|
26
8
|
* Creates an instance of InvitationModule.
|
|
27
|
-
*
|
|
28
|
-
* @param {string} url - The URL to fetch data from.
|
|
29
|
-
*/
|
|
30
|
-
constructor(url) {
|
|
31
|
-
this.#url = url;
|
|
32
|
-
this.#type = "Invitation";
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Asynchronously retrieves data based on the specified properties.
|
|
37
|
-
*
|
|
38
|
-
* @async
|
|
39
|
-
* @param {Array<string>} requestedProperties - An array of properties to retrieve.
|
|
40
|
-
* @returns {Promise<Object>} A promise that resolves to the retrieved data.
|
|
9
|
+
* @param {string} league - The league name.
|
|
41
10
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Calls the getData function to fetch Invitation data.
|
|
46
|
-
*
|
|
47
|
-
* @type {Promise<Array<Object>>}
|
|
48
|
-
*/
|
|
49
|
-
return getData(this.#url, this.#type, requestedProperties);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
/**
|
|
52
|
-
* Throws an error if there's an issue fetching or processing the Invitation data.
|
|
53
|
-
*
|
|
54
|
-
* @throws {Error}
|
|
55
|
-
*/
|
|
56
|
-
throw new Error(`Error fetching Invitation data: ${error.message}`);
|
|
57
|
-
}
|
|
11
|
+
constructor(league) {
|
|
12
|
+
super(league, "Invitation");
|
|
58
13
|
}
|
|
59
14
|
}
|
|
60
15
|
|
|
@@ -1,60 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const ItemBaseClass = require("../../ItemBaseClass");
|
|
3
2
|
/**
|
|
4
|
-
* Represents a module for
|
|
5
|
-
*
|
|
6
|
-
* @class
|
|
3
|
+
* Represents a module for handling maps.
|
|
4
|
+
* @extends ItemBaseClass
|
|
7
5
|
*/
|
|
8
|
-
class MapModule {
|
|
9
|
-
/**
|
|
10
|
-
* The URL for fetching data.
|
|
11
|
-
*
|
|
12
|
-
* @private
|
|
13
|
-
* @type {string}
|
|
14
|
-
*/
|
|
15
|
-
#url;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The type of data (Map in this case).
|
|
19
|
-
*
|
|
20
|
-
* @private
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
#type;
|
|
24
|
-
|
|
6
|
+
class MapModule extends ItemBaseClass {
|
|
25
7
|
/**
|
|
26
8
|
* Creates an instance of MapModule.
|
|
27
|
-
*
|
|
28
|
-
* @param {string} url - The URL to fetch data from.
|
|
29
|
-
*/
|
|
30
|
-
constructor(url) {
|
|
31
|
-
this.#url = url;
|
|
32
|
-
this.#type = "Map";
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Asynchronously retrieves data based on the specified properties.
|
|
37
|
-
*
|
|
38
|
-
* @async
|
|
39
|
-
* @param {Array<string>} requestedProperties - An array of properties to retrieve.
|
|
40
|
-
* @returns {Promise<Object>} A promise that resolves to the retrieved data.
|
|
9
|
+
* @param {string} league - The league name.
|
|
41
10
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Calls the getData function to fetch Map data.
|
|
46
|
-
*
|
|
47
|
-
* @type {Promise<Array<Object>>}
|
|
48
|
-
*/
|
|
49
|
-
return getData(this.#url, this.#type, requestedProperties);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
/**
|
|
52
|
-
* Throws an error if there's an issue fetching or processing the Map data.
|
|
53
|
-
*
|
|
54
|
-
* @throws {Error}
|
|
55
|
-
*/
|
|
56
|
-
throw new Error(`Error fetching Map data: ${error.message}`);
|
|
57
|
-
}
|
|
11
|
+
constructor(league) {
|
|
12
|
+
super(league, "Map");
|
|
58
13
|
}
|
|
59
14
|
}
|
|
60
15
|
|
|
@@ -1,60 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const ItemBaseClass = require("../../ItemBaseClass");
|
|
3
2
|
/**
|
|
4
|
-
* Represents a module for
|
|
5
|
-
*
|
|
6
|
-
* @class
|
|
3
|
+
* Represents a module for handling memories.
|
|
4
|
+
* @extends ItemBaseClass
|
|
7
5
|
*/
|
|
8
|
-
class MemoryModule {
|
|
9
|
-
/**
|
|
10
|
-
* The URL for fetching data.
|
|
11
|
-
*
|
|
12
|
-
* @private
|
|
13
|
-
* @type {string}
|
|
14
|
-
*/
|
|
15
|
-
#url;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The type of data (Memory in this case).
|
|
19
|
-
*
|
|
20
|
-
* @private
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
#type;
|
|
24
|
-
|
|
6
|
+
class MemoryModule extends ItemBaseClass {
|
|
25
7
|
/**
|
|
26
8
|
* Creates an instance of MemoryModule.
|
|
27
|
-
*
|
|
28
|
-
* @param {string} url - The URL to fetch data from.
|
|
29
|
-
*/
|
|
30
|
-
constructor(url) {
|
|
31
|
-
this.#url = url;
|
|
32
|
-
this.#type = "Memory";
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Asynchronously retrieves data based on the specified properties.
|
|
37
|
-
*
|
|
38
|
-
* @async
|
|
39
|
-
* @param {Array<string>} requestedProperties - An array of properties to retrieve.
|
|
40
|
-
* @returns {Promise<Object>} A promise that resolves to the retrieved data.
|
|
9
|
+
* @param {string} league - The league name.
|
|
41
10
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Calls the getData function to fetch Memory data.
|
|
46
|
-
*
|
|
47
|
-
* @type {Promise<Array<Object>>}
|
|
48
|
-
*/
|
|
49
|
-
return getData(this.#url, this.#type, requestedProperties);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
/**
|
|
52
|
-
* Throws an error if there's an issue fetching or processing the Memory data.
|
|
53
|
-
*
|
|
54
|
-
* @throws {Error}
|
|
55
|
-
*/
|
|
56
|
-
throw new Error(`Error fetching Memory data: ${error.message}`);
|
|
57
|
-
}
|
|
11
|
+
constructor(league) {
|
|
12
|
+
super(league, "Memory");
|
|
58
13
|
}
|
|
59
14
|
}
|
|
60
15
|
|
|
@@ -1,60 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const ItemBaseClass = require("../../ItemBaseClass");
|
|
3
2
|
/**
|
|
4
|
-
* Represents a module for
|
|
5
|
-
*
|
|
6
|
-
* @class
|
|
3
|
+
* Represents a module for handling oils.
|
|
4
|
+
* @extends ItemBaseClass
|
|
7
5
|
*/
|
|
8
|
-
class OilModule {
|
|
9
|
-
/**
|
|
10
|
-
* The URL for fetching data.
|
|
11
|
-
*
|
|
12
|
-
* @private
|
|
13
|
-
* @type {string}
|
|
14
|
-
*/
|
|
15
|
-
#url;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The type of data (Oil in this case).
|
|
19
|
-
*
|
|
20
|
-
* @private
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
#type;
|
|
24
|
-
|
|
6
|
+
class OilModule extends ItemBaseClass {
|
|
25
7
|
/**
|
|
26
8
|
* Creates an instance of OilModule.
|
|
27
|
-
*
|
|
28
|
-
* @param {string} url - The URL to fetch data from.
|
|
29
|
-
*/
|
|
30
|
-
constructor(url) {
|
|
31
|
-
this.#url = url;
|
|
32
|
-
this.#type = "Oil";
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Asynchronously retrieves data based on the specified properties.
|
|
37
|
-
*
|
|
38
|
-
* @async
|
|
39
|
-
* @param {Array<string>} requestedProperties - An array of properties to retrieve.
|
|
40
|
-
* @returns {Promise<Object>} A promise that resolves to the retrieved data.
|
|
9
|
+
* @param {string} league - The league name.
|
|
41
10
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Calls the getData function to fetch Oil data.
|
|
46
|
-
*
|
|
47
|
-
* @type {Promise<Array<Object>>}
|
|
48
|
-
*/
|
|
49
|
-
return getData(this.#url, this.#type, requestedProperties);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
/**
|
|
52
|
-
* Throws an error if there's an issue fetching or processing the Oil data.
|
|
53
|
-
*
|
|
54
|
-
* @throws {Error}
|
|
55
|
-
*/
|
|
56
|
-
throw new Error(`Error fetching Oil data: ${error.message}`);
|
|
57
|
-
}
|
|
11
|
+
constructor(league) {
|
|
12
|
+
super(league, "Oil");
|
|
58
13
|
}
|
|
59
14
|
}
|
|
60
15
|
|
|
@@ -1,60 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const ItemBaseClass = require("../../ItemBaseClass");
|
|
3
2
|
/**
|
|
4
|
-
* Represents a module for
|
|
5
|
-
*
|
|
6
|
-
* @class
|
|
3
|
+
* Represents a module for handling omens.
|
|
4
|
+
* @extends ItemBaseClass
|
|
7
5
|
*/
|
|
8
|
-
class OmenModule {
|
|
9
|
-
/**
|
|
10
|
-
* The URL for fetching data.
|
|
11
|
-
*
|
|
12
|
-
* @private
|
|
13
|
-
* @type {string}
|
|
14
|
-
*/
|
|
15
|
-
#url;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The type of data (Omen in this case).
|
|
19
|
-
*
|
|
20
|
-
* @private
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
#type;
|
|
24
|
-
|
|
6
|
+
class OmenModule extends ItemBaseClass {
|
|
25
7
|
/**
|
|
26
8
|
* Creates an instance of OmenModule.
|
|
27
|
-
*
|
|
28
|
-
* @param {string} url - The URL to fetch data from.
|
|
29
|
-
*/
|
|
30
|
-
constructor(url) {
|
|
31
|
-
this.#url = url;
|
|
32
|
-
this.#type = "Omen";
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Asynchronously retrieves data based on the specified properties.
|
|
37
|
-
*
|
|
38
|
-
* @async
|
|
39
|
-
* @param {Array<string>} requestedProperties - An array of properties to retrieve.
|
|
40
|
-
* @returns {Promise<Object>} A promise that resolves to the retrieved data.
|
|
9
|
+
* @param {string} league - The league name.
|
|
41
10
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Calls the getData function to fetch Omen data.
|
|
46
|
-
*
|
|
47
|
-
* @type {Promise<Array<Object>>}
|
|
48
|
-
*/
|
|
49
|
-
return getData(this.#url, this.#type, requestedProperties);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
/**
|
|
52
|
-
* Throws an error if there's an issue fetching or processing the Omen data.
|
|
53
|
-
*
|
|
54
|
-
* @throws {Error}
|
|
55
|
-
*/
|
|
56
|
-
throw new Error(`Error fetching Omen data: ${error.message}`);
|
|
57
|
-
}
|
|
11
|
+
constructor(league) {
|
|
12
|
+
super(league, "Omen");
|
|
58
13
|
}
|
|
59
14
|
}
|
|
60
15
|
|
|
@@ -1,60 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const ItemBaseClass = require("../../ItemBaseClass");
|
|
3
2
|
/**
|
|
4
|
-
* Represents a module for
|
|
5
|
-
*
|
|
6
|
-
* @class
|
|
3
|
+
* Represents a module for handling resonators.
|
|
4
|
+
* @extends ItemBaseClass
|
|
7
5
|
*/
|
|
8
|
-
class ResonatorModule {
|
|
9
|
-
/**
|
|
10
|
-
* The URL for fetching data.
|
|
11
|
-
*
|
|
12
|
-
* @private
|
|
13
|
-
* @type {string}
|
|
14
|
-
*/
|
|
15
|
-
#url;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The type of data (Resonator in this case).
|
|
19
|
-
*
|
|
20
|
-
* @private
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
#type;
|
|
24
|
-
|
|
6
|
+
class ResonatorModule extends ItemBaseClass {
|
|
25
7
|
/**
|
|
26
8
|
* Creates an instance of ResonatorModule.
|
|
27
|
-
*
|
|
28
|
-
* @param {string} url - The URL to fetch data from.
|
|
29
|
-
*/
|
|
30
|
-
constructor(url) {
|
|
31
|
-
this.#url = url;
|
|
32
|
-
this.#type = "Resonator";
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Asynchronously retrieves data based on the specified properties.
|
|
37
|
-
*
|
|
38
|
-
* @async
|
|
39
|
-
* @param {Array<string>} requestedProperties - An array of properties to retrieve.
|
|
40
|
-
* @returns {Promise<Object>} A promise that resolves to the retrieved data.
|
|
9
|
+
* @param {string} league - The league name.
|
|
41
10
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Calls the getData function to fetch Resonator data.
|
|
46
|
-
*
|
|
47
|
-
* @type {Promise<Array<Object>>}
|
|
48
|
-
*/
|
|
49
|
-
return getData(this.#url, this.#type, requestedProperties);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
/**
|
|
52
|
-
* Throws an error if there's an issue fetching or processing the Resonator data.
|
|
53
|
-
*
|
|
54
|
-
* @throws {Error}
|
|
55
|
-
*/
|
|
56
|
-
throw new Error(`Error fetching Resonator data: ${error.message}`);
|
|
57
|
-
}
|
|
11
|
+
constructor(league) {
|
|
12
|
+
super(league, "Resonator");
|
|
58
13
|
}
|
|
59
14
|
}
|
|
60
15
|
|