UNPKG

6.46 kBMarkdownView Raw
1## Warframe-items
2
3[![Supported by Warframe Community Developers](https://warframestat.us/wfcd.png)](https://github.com/WFCD "Supported by Warframe Community Developers")
4
5[![npm](https://img.shields.io/npm/v/warframe-items.svg)](https://npmjs.org/warframe-items)
6[![warframe update](https://img.shields.io/badge/warframe_update-28.1.0-blue.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOTgiIGhlaWdodD0iMTczIiB2aWV3Qm94PSIwIDAgMjk4IDE3MyI%2BPHBhdGggZD0iTTE4NSA2N2MxNSA4IDI4IDE2IDMxIDE5czIzIDE4LTcgNjBjMCAwIDM1LTMxIDI2LTc5LTE0LTctNjItMzYtNzAtNDUtNC01LTEwLTEyLTE1LTIyLTUgMTAtOSAxNC0xNSAyMi0xMyAxMy01OCAzOC03MiA0NS05IDQ4IDI2IDc5IDI2IDc5LTMwLTQyLTEwLTU3LTctNjBsMzEtMTkgMzYtMjIgMzYgMjJ6TTU1IDE3M2wtMTctM2MtOC0xOS0yMC00NC0yNC01MC01LTctNy0xMS0xNC0xNWwxOC0yYzE2LTMgMjItNyAzMi0xMyAxIDYgMCA5IDIgMTQtNiA0LTIxIDEwLTI0IDE2IDMgMTQgNSAyNyAyNyA1M3ptMTYtMTFsLTktMi0xNC0yOWEzMCAzMCAwIDAgMC04LThoN2wxMy00IDQgN2MtMyAyLTcgMy04IDZhODYgODYgMCAwIDAgMTUgMzB6bTE3MiAxMWwxNy0zYzgtMTkgMjAtNDQgMjQtNTAgNS03IDctMTEgMTQtMTVsLTE4LTJjLTE2LTMtMjItNy0zMi0xMy0xIDYgMCA5LTIgMTQgNiA0IDIxIDEwIDI0IDE2LTMgMTQtNSAyNy0yNyA1M3ptLTE2LTExbDktMiAxNC0yOWEzMCAzMCAwIDAgMSA4LThoLTdsLTEzLTQtNCA3YzMgMiA3IDMgOCA2YTg2IDg2IDAgMCAxLTE1IDMwem0tNzktNDBsLTYtNmMtMSAzLTMgNi02IDdsNSA1YTUgNSAwIDAgMSAyIDB6bS0xMy0yYTQgNCAwIDAgMSAxLTJsMi0yYTQgNCAwIDAgMSAyLTFsNC0xNy0xNy0xMC04IDcgMTMgOC0yIDctNyAyLTgtMTItOCA4IDEwIDE3em0xMiAxMWE1IDUgMCAwIDAtNC0yIDQgNCAwIDAgMC0zIDFsLTMwIDI3YTUgNSAwIDAgMCAwIDdsNCA0YTYgNiAwIDAgMCA0IDIgNSA1IDAgMCAwIDMtMWwyNy0zMWMyLTIgMS01LTEtN3ptMzkgMjZsLTMwLTI4LTYgNmE1IDUgMCAwIDEgMCAzbDI2IDI5YTEgMSAwIDAgMCAxIDBsNS0yIDItMmMxLTIgMy01IDItNnptNS00NWEyIDIgMCAwIDAtNCAwbC0xIDEtMi00YzEtMy01LTktNS05LTEzLTE0LTIzLTE0LTI3LTEzLTIgMS0yIDEgMCAyIDE0IDIgMTUgMTAgMTMgMTNhNCA0IDAgMCAwLTEgMyAzIDMgMCAwIDAgMSAxbC0yMSAyMmE3IDcgMCAwIDEgNCAyIDggOCAwIDAgMSAyIDNsMjAtMjFhNyA3IDAgMCAwIDEgMSA0IDQgMCAwIDAgNCAwYzEtMSA2IDMgNyA0aC0xYTMgMyAwIDAgMCAwIDQgMiAyIDAgMCAwIDQgMGw2LTZhMyAzIDAgMCAwIDAtM3oiIGZpbGw9IiMyZTk2ZWYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg%3D%3D)](https://forums.warframe.com/topic/1205630-the-steel-path-update-2810/)
7[![build](https://ci.nexus-stats.com/api/badges/WFCD/warframe-items/status.svg)](https://ci.nexus-stats.com/WFCD/warframe-items)
8[![dependencies](https://david-dm.org/WFCD/warframe-items.svg)](https://david-dm.org/WFCD/warframe-items)
9[![Discord](https://img.shields.io/discord/256087517353213954.svg?logo=discord)](https://discord.gg/jGZxH9f)
10
11<br>
12
13Fetches all items available on Warframe's mobile API endpoints while also
14adding images, drop rates, patch logs and related rivens.
15
16The aim of this library is to create a complete collection of data for every
17item in Warframe based on the game's own data. This repo will be automatically
18updated on every new release, drop rate change or image change.
19
20<br>
21
22### Why use this instead of any other scraper?
23Because this gives you literally every item in Warframe, many of which can't even
24be found on the wikia. We also make sure to include every other data aspect
25that you could possibly need. To give you some idea:
26
27- Unique ingame name - (/Lotus/Weapons/Tenno/...) - Especially useful when working with worldState
28- Drop rates
29- Patchlogs for each item
30- Minified source images
31- Rivens
32- Whether items are tradable
33
34And tons more item specific data. Check out [/data/json](/data/json) to get an
35idea.
36
37You can also rest assured that this repository will be maintained for as long
38as Warframe stays alive, as it is has been built to provide all item data for [NexusHub](https://github.com/nexus-devs/NexusHub).
39
40<br>
41
42### Installation
43```
44npm install warframe-items
45```
46
47<br>
48
49### Usage
50```js
51const Items = require('warframe-items')
52const items = new Items(options, ...items)
53```
54In this example, `items` is an Array with all items. The `...items` param
55allows you to add your own items before our gathered ones.
56
57<br>
58
59### Options
60| Option | Default | Description |
61|:------------- |:------------- |:------------- |
62| category | `['All']` | Array of item categories to retrieve. Parallel to file names in /data/json. Useful if you don't wanna load lots and lots of MB of data into memory.
63
64| Categories | Description|
65|:--- | :---- |
66| All | All categories in one file |
67| Arcanes | Operator, Zaw, and some Warframe Arcanes |
68| Archwing | Archwings.... nuff said |
69| Arch-Gun | Archwing Guns |
70| Arch-Melee | Archwing Melee weapons |
71| Enemy | NPCs |
72| Fish | Fish that you fish|
73| Gear | Things you equip in your gear wheel
74| Glyphs | Glyphs from partners, etc. |
75| Melee | Melee weapons |
76| Misc | Uncategorized items |
77| Mods | Modifications for weapons, warframes, archwings, etc. |
78| Node | Mission nodes |
79| Pets | Companions, just the beasts |
80| Primary | Primary slot weapons |
81| Quests | Quests that you adventure on |
82| Relics | Things you get prime parts from |
83| Resources | For building stuff |
84| Secondary | Secondary slot weapons |
85| Sentinels | Mechanical companions |
86| Sigils | Chest & back art |
87| Skins | Henna for your frame |
88| Warframes | Warframes...|
89
90<br>
91
92### Pre-compiled data
93You can find all automatically compiled data in `/data/json`. Images are stored
94in `/data/img`. You can find every item's image name stored in `item.imageName`.
95
96<br>
97
98### Image links
99
100Since there are so many images, and we can't publish them on npm due to the size, we've set up a CDN to get you images at `https://cdn.warframestat.us/img/${item.imageName}` that provides a linkable resource for you.
101
102<br>
103<br>
104
105## For Developers
106We're always happy to see contributions to this project, so here's some basic setup information
107to get you started.
108
109<br>
110
111### Dependencies
112- [Node.js > 10](https://nodejs.org/en/)
113- [Lua > 5](https://www.lua.org/download.html)
114- Build Tools (`build-essentials` on linux should be enough, on windows run `npm i -g windows-build-tools`)
115- libpng-dev12 (linux only)
116
117<br>
118
119### File structure
120All relevant scripts are found in `/build/` with
121
122[build.js](/build/build.js)<br>
123The entrypoint for the build script. Here we also save JSON, image and cache data.
124
125[scraper.js](/build/scraper.js)<br>
126Fetches all external data and returns it to the parser.
127
128[parser.js](/build/parser.js)<br>
129Parses the external data to match our schema and returns it to the build script.
130
131<br>
132
133### Usage and Testing
134You can run the build script with `npm run build`.
135Once built, you can verify the data with `npm test`.
136
137<br>
138
139## License
140[MIT](/LICENSE)