poe-api-manager 0.1.0 → 0.2.2

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 (67) hide show
  1. package/Changelog.md +7 -2
  2. package/README.md +78 -17
  3. package/index.js +5 -1
  4. package/lib/NinjaAPI.js +1 -1
  5. package/lib/WatchAPI.js +12 -0
  6. package/lib/config/poeWatch/url.js +3 -0
  7. package/lib/modules/poe.ninja/currency/CurrencyWievModule.js +5 -3
  8. package/lib/modules/poe.ninja/currency/currencySubmodules/functions/getData.js +1 -1
  9. package/lib/modules/poe.ninja/currency/currencySubmodules/subModules/CurrencyModule.js +6 -3
  10. package/lib/modules/poe.ninja/currency/currencySubmodules/subModules/FragmentModule.js +6 -3
  11. package/lib/modules/poe.ninja/item/ItemWievModule.js +5 -3
  12. package/lib/modules/poe.ninja/item/itemSubmodules/functions/getData.js +1 -1
  13. package/lib/modules/poe.ninja/item/itemSubmodules/itemSubModules.js +0 -2
  14. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/BaseTypeModule.js +5 -3
  15. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/BeastModule.js +5 -3
  16. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/BlightRavagedMapModule.js +5 -3
  17. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/BlightedMapModule.js +5 -3
  18. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/ClusterJewelModule.js +5 -3
  19. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/DeliriumOrbsModule.js +5 -3
  20. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/DivinationCardModule.js +5 -3
  21. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/EssenceModule.js +5 -3
  22. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/FossilModule.js +5 -3
  23. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/HelmetEnchantModule.js +5 -3
  24. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/IncubatorModule.js +5 -3
  25. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/InvitationModule.js +5 -3
  26. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/MapModule.js +5 -3
  27. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/MemoryModule.js +5 -3
  28. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/OilModule.js +5 -3
  29. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/OmenModule.js +5 -3
  30. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/ResonatorModule.js +5 -3
  31. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/ScarabModule.js +5 -3
  32. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/SkillGemModule.js +5 -3
  33. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueAccessoryModule.js +5 -3
  34. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueArmourModule.js +5 -3
  35. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueFlaskModule.js +5 -3
  36. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueJewelModule.js +5 -3
  37. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueMapModule.js +5 -3
  38. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueRelicModule.js +5 -3
  39. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/UniqueWeaponModule.js +5 -3
  40. package/lib/modules/poe.ninja/item/itemSubmodules/subModules/VialsModule.js +5 -3
  41. package/lib/modules/poe.watch/WatchWievModule.js +28 -0
  42. package/lib/modules/poe.watch/allModules/Modules.js +23 -0
  43. package/lib/modules/poe.watch/allModules/fetch/fetch.js +19 -0
  44. package/lib/modules/poe.watch/allModules/functions/getData.js +20 -0
  45. package/lib/modules/poe.watch/allModules/submodules/AccessoryModule.js +13 -0
  46. package/lib/modules/poe.watch/allModules/submodules/ArmourModule.js +13 -0
  47. package/lib/modules/poe.watch/allModules/submodules/BaseModule.js +13 -0
  48. package/lib/modules/poe.watch/allModules/submodules/BeastModule.js +13 -0
  49. package/lib/modules/poe.watch/allModules/submodules/CurrencyModule.js +13 -0
  50. package/lib/modules/poe.watch/allModules/submodules/DeliriumOrbModule.js +13 -0
  51. package/lib/modules/poe.watch/allModules/submodules/DivsModule.js +13 -0
  52. package/lib/modules/poe.watch/allModules/submodules/EssenceModule.js +13 -0
  53. package/lib/modules/poe.watch/allModules/submodules/FlaskModule.js +13 -0
  54. package/lib/modules/poe.watch/allModules/submodules/FossilModule.js +13 -0
  55. package/lib/modules/poe.watch/allModules/submodules/FragmentModule.js +13 -0
  56. package/lib/modules/poe.watch/allModules/submodules/GemModule.js +13 -0
  57. package/lib/modules/poe.watch/allModules/submodules/InscribedModule.js +13 -0
  58. package/lib/modules/poe.watch/allModules/submodules/InvitationModule.js +13 -0
  59. package/lib/modules/poe.watch/allModules/submodules/JewelModule.js +13 -0
  60. package/lib/modules/poe.watch/allModules/submodules/MapModule.js +13 -0
  61. package/lib/modules/poe.watch/allModules/submodules/OilModule.js +13 -0
  62. package/lib/modules/poe.watch/allModules/submodules/ScarabModule.js +13 -0
  63. package/lib/modules/poe.watch/allModules/submodules/SextantModule.js +13 -0
  64. package/lib/modules/poe.watch/allModules/submodules/UniqueMapsModule.js +13 -0
  65. package/lib/modules/poe.watch/allModules/submodules/WeaponModule.js +13 -0
  66. package/package.json +13 -5
  67. /package/lib/modules/{filter → mainfunctions/filter}/propertyFilter.js +0 -0
package/Changelog.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Changelog
2
+ ## 0.2.2
3
+ poe.watch API add
2
4
 
3
- ## 0.1.0 17.02.1014
5
+ use getData() function
6
+
7
+
8
+ ## 0.1.0
4
9
  poe.ninja API new
5
10
 
6
11
  - Omens
@@ -11,4 +16,4 @@ poe.ninja API new
11
16
  - Invitations
12
17
  - Memories
13
18
 
14
- ## 0.0.1 Publish 15.02.2024
19
+ ## 0.0.1 Publish
package/README.md CHANGED
@@ -1,16 +1,21 @@
1
- # poe-economy-manager
1
+ # poe-api-manager
2
2
 
3
3
  [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
4
4
  ![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=javascript)
6
6
  [![ISSUES](https://img.shields.io/github/issues/ayberkgezer/poe-api-manager)](https://github.com/ayberkgezer/poe-api-manager/issues)
7
+ ![NPM Downloads](https://img.shields.io/npm/dt/poe-api-manager?logo=npm)
8
+
7
9
 
8
10
  - [Introduction](#introduction)
9
11
  - [Overwiev](#overwiev)
10
12
  - [Installation](#installation)
11
13
  - [Getting Started](#getting-started)
12
- - [currencyWiev](#currencywiev)
13
- - [itemWiev](#itemwiev)
14
+ - [poe.ninja](#ninjaapi)
15
+ - [currencyWiev](#currencywiev)
16
+ - [itemWiev](#itemwiev)
17
+ - [poe.watch](#watchapi)
18
+ - [wiev](#wiev)
14
19
  - [Changelog](https://github.com/ayberkgezer/poe-api-manager/blob/main/Changelog.md)
15
20
  - [Examples](#examples)
16
21
 
@@ -19,13 +24,13 @@
19
24
  ## Introduction
20
25
  The purpose of this library is to make the economic data in the Path of Exile game easily usable.
21
26
 
22
- >Important!: For economy, it is taken from the poe.ninja website. (for now)
27
+ >Important!: For economy, it is taken from the poe.ninja and poe.watch
23
28
 
24
- > Note: This product is in no way affiliated with or endorsed by Grinding Gear Games and poe.ninja.
29
+ > Note: This product is in no way affiliated with or endorsed by Grinding Gear Games, poe.ninja and poe.watch.
25
30
 
26
31
  ## Overwiev
27
32
 
28
- There are two types of usage for Poe: [currencywiev](#currencywiev) and [itemwiev](#itemwiev).
33
+ Permission to access two different services. poe.ninja and poe.watch
29
34
 
30
35
  ## Installation
31
36
  **Install with npm:**
@@ -34,13 +39,15 @@ $ npm install poe-api-manager
34
39
  ```
35
40
 
36
41
  ## Getting Started
42
+
43
+ ### ninjaAPI
37
44
  ```javascript
38
- const NinjaAPI = require("poe-api-manager");
45
+ const { NinjaAPI } = require("poe-api-manager");
39
46
 
40
47
  const ninjaAPI = new NinjaAPI("League-Name");
41
48
  ```
42
49
 
43
- ### currencyWiev
50
+ #### currencyWiev
44
51
  What we can get here is as follows.
45
52
  - Currency
46
53
  - Fragment
@@ -60,7 +67,7 @@ ninjaAPI.currencyWiev.currency.getData(["id", "name", "icon"]).then((data) => {
60
67
  console.log(data);
61
68
  });
62
69
  ```
63
- ### itemWiev
70
+ #### itemWiev
64
71
  What we can get here is as follows.
65
72
  - BaseType
66
73
  - Beast
@@ -105,48 +112,102 @@ ninjaAPI.itemWiev.baseType.getData(["id", "name", "icon"]).then((data) => {
105
112
  console.log(data);
106
113
  });
107
114
  ```
115
+ ### watchAPI
116
+ ```javascript
117
+ const { WatchAPI } = require("poe-api-manager");
118
+
119
+ const watchAPI = new WatchAPI("League-Name");
120
+ ```
121
+ #### wiev
122
+ What we can get here is as follows.
123
+ - Currency
124
+ - Essences
125
+ - Fossil
126
+ - Fragment
127
+ - Gem
128
+ - Invitation
129
+ - Jewel
130
+ - Map
131
+ - Oil
132
+ - Scarab
133
+ - Sextant
134
+ - Accessory
135
+ - Armour
136
+ - Weapon
137
+ - Flask
138
+ - Base
139
+ - Beast
140
+
141
+ ```javascript
142
+ //Example Currency
143
+ watchAPI.wiev.baseType.getData().then((data) => {
144
+ console.log(data);
145
+ });
146
+ ```
147
+ > Enter [poe.watch Document](https://docs.poe.watch/#get-all-armours) to access the values for the filter.
148
+ ```javascript
149
+ //Filtered data is returned
150
+ watchAPI.wiev.currency.getData(["id", "name", "icon"]).then((data) => {
151
+ console.log(data);
152
+ });
153
+ ```
108
154
 
109
155
  ## Examples
110
156
  ```javascript
111
- const NinjaAPI = require("poe-api-manager");
157
+ const { NinjaAPI , WatchAPI } = require("poe-api-manager");
112
158
 
113
159
  // Create NinjaAPI
114
160
  const ninjaAPI = new NinjaAPI("Affliction");
161
+ //Create WatchAPI
162
+ const watchAPI = new WatchAPI("Affliction")
115
163
 
116
164
  //We entered the filter data
117
165
  const requestedProperties = ["id", "name", "icon"];
118
166
 
119
- //filtered BaseType data
167
+ //filtered BaseType data ninjaAPI
120
168
  ninjaAPI.itemwiev.baseType.getData(requestedProperties).then((data) => {
121
169
  console.log(data);
122
170
  });
123
171
 
124
- //filtered Currency data
172
+ //filtered Currency data ninjaAPI
125
173
  ninjaAPI.currencyWiev.currency.getData(requestedProperties).then((data) => {
126
174
  console.log(data);
127
175
  });
176
+
177
+ // filtered Scarab data watchAPI
178
+ watchAPI.wiev.scarab.getData(requestedProperties).then((data) => {
179
+ console.log(data);
180
+ });
128
181
  ```
129
182
 
130
183
  ```javascript
131
- const NinjaAPI = require("poe-api-manager");
184
+ const { NinjaAPI , WatchAPI } = require("poe-api-manager");
132
185
 
133
186
  // Create NinjaAPI
134
187
  const ninjaAPI = new NinjaAPI("Affliction");
188
+ //Create WatchAPI
189
+ const watchAPI = new WatchAPI("Affliction")
135
190
 
136
191
  const requestedProperties = ["id", "name", "icon"];
137
192
 
138
193
  //Using await in an async function
139
194
  const fetchData = async () => {
140
195
  try {
141
- //Oil Data
196
+ //Oil Data poe.ninja
142
197
  const oilData = await ninjaAPI.item.oil.getData(requestedProperties);
143
198
 
144
- console.log("Oil Data:", oilData);
145
199
 
146
- //Currency Data
200
+ console.log("poe.ninja Oil Data:", oilData);
201
+
202
+ //Currency Data poe.ninja
147
203
  const currencyData = await ninjaAPI.currencyWiev.currency.getData(requestedProperties);
148
204
 
149
- console.log("Currency Data:", currencyData);
205
+ console.log("poe.ninja Currency Data:", currencyData);
206
+
207
+ //Scarab Data poe.watch
208
+ const scarabData = await watchAPI.wiev.scarab.getData(requestedProperties)
209
+
210
+ console.log("poe.watch Scarab Data", scarabData);
150
211
  } catch (error) {
151
212
  console.error("Error fetching data:", error);
152
213
  }
package/index.js CHANGED
@@ -1,3 +1,7 @@
1
1
  const NinjaAPI = require("./lib/NinjaAPI");
2
+ const WatchAPI = require("./lib/WatchAPI");
2
3
 
3
- module.exports = NinjaAPI;
4
+ module.exports = {
5
+ NinjaAPI: NinjaAPI,
6
+ WatchAPI: WatchAPI,
7
+ };
package/lib/NinjaAPI.js CHANGED
@@ -3,9 +3,9 @@ const CurrencyWievModule = require("./modules/poe.ninja/currency/CurrencyWievMod
3
3
 
4
4
  class NinjaAPI {
5
5
  constructor(league) {
6
- this.league = league;
7
6
  this.currencyWiev = new CurrencyWievModule(league);
8
7
  this.itemWiev = new ItemWievModule(league);
9
8
  }
10
9
  }
10
+ // Export the NinjaAPI class
11
11
  module.exports = NinjaAPI;
@@ -0,0 +1,12 @@
1
+ const WatchWievModule = require("./modules/poe.watch/WatchWievModule");
2
+
3
+ class WatchAPI {
4
+ #league;
5
+ #leagueUrl;
6
+ constructor(league) {
7
+ this.#league = league;
8
+ this.#leagueUrl = `&league=${this.#league}`;
9
+ this.wiev = new WatchWievModule(this.#leagueUrl);
10
+ }
11
+ }
12
+ module.exports = WatchAPI;
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ baseurl: "https://api.poe.watch/get?category=",
3
+ };
@@ -3,10 +3,12 @@ const baseurl = require("../../../config/poeNinja/url");
3
3
 
4
4
  //currencywiev module
5
5
  class CurrencyWievModule {
6
+ #league;
7
+ #baseurl;
6
8
  constructor(league) {
7
- this.league = league;
8
- this.baseurl = baseurl.baseurl;
9
- const url = `${this.baseurl}currencyoverview?league=${this.league}&type=`;
9
+ this.#league = league;
10
+ this.#baseurl = baseurl.baseurl;
11
+ const url = `${this.#baseurl}currencyoverview?league=${this.#league}&type=`;
10
12
 
11
13
  this.currency = new currencySubmodules.CurrencyModule(url);
12
14
  this.fragment = new currencySubmodules.FragmentModule(url);
@@ -1,5 +1,5 @@
1
1
  const fetchData = require("../../currencyFetch/fetchCurrency");
2
- const filterProperties = require("../../../../filter/propertyFilter");
2
+ const filterProperties = require("../../../../mainfunctions/filter/propertyFilter");
3
3
 
4
4
  async function getData(url, type, requestedProperties) {
5
5
  try {
@@ -1,13 +1,16 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class CurrencyModule {
4
+ #url;
5
+ #type;
6
+
4
7
  constructor(url) {
5
- this.url = url;
6
- this.type = "Currency";
8
+ this.#url = url;
9
+ this.#type = "Currency";
7
10
  }
8
11
 
9
12
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
13
+ return getData(this.#url, this.#type, requestedProperties);
11
14
  }
12
15
  }
13
16
 
@@ -1,13 +1,16 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class FragmentModule {
4
+ #url;
5
+ #type;
6
+
4
7
  constructor(url) {
5
- this.url = url;
6
- this.type = "Fragment";
8
+ this.#url = url;
9
+ this.#type = "Fragment";
7
10
  }
8
11
 
9
12
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
13
+ return getData(this.#url, this.#type, requestedProperties);
11
14
  }
12
15
  }
13
16
 
@@ -3,10 +3,12 @@ const baseurl = require("../../../config/poeNinja/url");
3
3
 
4
4
  //itemwiev module
5
5
  class ItemWievModule {
6
+ #league;
7
+ #baseurl;
6
8
  constructor(league) {
7
- this.league = league;
8
- this.baseurl = baseurl.baseurl;
9
- const url = `${this.baseurl}itemoverview?league=${this.league}&type=`;
9
+ this.#league = league;
10
+ this.#baseurl = baseurl.baseurl;
11
+ const url = `${this.#baseurl}itemoverview?league=${this.#league}&type=`;
10
12
 
11
13
  this.baseType = new itemSubmodules.BaseTypeModule(url);
12
14
  this.beast = new itemSubmodules.BeastModule(url);
@@ -1,5 +1,5 @@
1
1
  const fetchData = require("../../itemFetch/fetchItem");
2
- const filterProperties = require("../../../../filter/propertyFilter");
2
+ const filterProperties = require("../../../../mainfunctions/filter/propertyFilter");
3
3
 
4
4
  async function getData(url, type, requestedProperties) {
5
5
  try {
@@ -1,5 +1,3 @@
1
- const OmenModule = require("./subModules/OmenModule");
2
-
3
1
  // itemSubmodules.js
4
2
  module.exports = {
5
3
  BaseTypeModule: require("./subModules/BaseTypeModule"),
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class BaseTypeModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "BaseType";
7
+ this.#url = url;
8
+ this.#type = "BaseType";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class BeastModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "Beast";
7
+ this.#url = url;
8
+ this.#type = "Beast";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class BlightRavagedMapModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "BlightRavagedMap";
7
+ this.#url = url;
8
+ this.#type = "BlightRavagedMap";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class BlightedMapModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "BlightedMap";
7
+ this.#url = url;
8
+ this.#type = "BlightedMap";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class ClusterJewelModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "ClusterJewel";
7
+ this.#url = url;
8
+ this.#type = "ClusterJewel";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class DeliriumOrbsModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "DeliriumOrb";
7
+ this.#url = url;
8
+ this.#type = "DeliriumOrb";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class DivinationCardModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "DivinationCard";
7
+ this.#url = url;
8
+ this.#type = "DivinationCard";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class EssenceModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "Essence";
7
+ this.#url = url;
8
+ this.#type = "Essence";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class FossilModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "Fossil";
7
+ this.#url = url;
8
+ this.#type = "Fossil";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class HelmetEnchantModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "HelmetEnchant";
7
+ this.#url = url;
8
+ this.#type = "HelmetEnchant";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class IncubatorModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "Incubator";
7
+ this.#url = url;
8
+ this.#type = "Incubator";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class InvitationModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "Invitation";
7
+ this.#url = url;
8
+ this.#type = "Invitation";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class MapModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "Map";
7
+ this.#url = url;
8
+ this.#type = "Map";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class MemoryModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "Memory";
7
+ this.#url = url;
8
+ this.#type = "Memory";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class OilModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "Oil";
7
+ this.#url = url;
8
+ this.#type = "Oil";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15
 
@@ -1,13 +1,15 @@
1
1
  const getData = require("../functions/getData");
2
2
 
3
3
  class OmenModule {
4
+ #url;
5
+ #type;
4
6
  constructor(url) {
5
- this.url = url;
6
- this.type = "Omen";
7
+ this.#url = url;
8
+ this.#type = "Omen";
7
9
  }
8
10
 
9
11
  async getData(requestedProperties) {
10
- return getData(this.url, this.type, requestedProperties);
12
+ return getData(this.#url, this.#type, requestedProperties);
11
13
  }
12
14
  }
13
15