pokemmo-items-prices 1.0.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.
package/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # Pokemmo Items Prices
2
+
3
+ A TypeScript library that fetches item market data from PokeMMO's GTL.
4
+ It uses the [Fiereu's](https://fiereu.de/) API for live market data and is inspired by [PokemmoHub](https://github.com/PokeMMO-Tools/pokemmo-hub) for retrieving item information.
5
+
6
+
7
+ # How to use
8
+
9
+ Instanciate a **PokemmoItemsPrices** object. You can then call its **getAllItems()** function that returns you a promise of a list of **Item** objects.
10
+
11
+ Note : The API isn't called each time you call the **getAllItems()** function. To refresh market data, use the **refreshItems()** function.
12
+
13
+ Example :
14
+ ```js
15
+ const prices = new PokemmoItemsPrices();
16
+ const items = prices.getAllItems().then((items) => {
17
+ console.log(items.length);
18
+ console.log(items[0]);
19
+ });
20
+ ```
21
+ result :
22
+ ```bash
23
+ 1341
24
+ Item {
25
+ name: {
26
+ en: 'Orange Mail',
27
+ cn: '橙色邮件',
28
+ de: 'Orange Mail',
29
+ fr: 'Orange Mail',
30
+ it: 'Orange Mail',
31
+ es: 'Orange Mail',
32
+ ja: 'Orange Mail',
33
+ tw: 'Orange Mail'
34
+ },
35
+ description: {
36
+ en: 'A piece of MAIL featuring a cute ZIGZAGOON print. It is to be held by a POKéMON',
37
+ cn: '印有蛇纹熊的信纸,可以让宝可梦携带',
38
+ de: 'A piece of MAIL featuring a cute ZIGZAGOON print. It is to be held by a POKéMON',
39
+ fr: 'A piece of MAIL featuring a cute ZIGZAGOON print. It is to be held by a POKéMON',
40
+ it: 'A piece of MAIL featuring a cute ZIGZAGOON print. It is to be held by a POKéMON',
41
+ es: 'A piece of MAIL featuring a cute ZIGZAGOON print. It is to be held by a POKéMON',
42
+ ja: 'A piece of MAIL featuring a cute ZIGZAGOON print. It is to be held by a POKéMON',
43
+ tw: 'A piece of MAIL featuring a cute ZIGZAGOON print. It is to be held by a POKéMON'
44
+ },
45
+ price: 153,
46
+ listings: 1,
47
+ quantity: 1
48
+ }
49
+ ```