File structure

This commit is contained in:
2022-03-12 03:35:35 +03:00
parent dcb3c2102e
commit 1e397af280
41 changed files with 1314 additions and 223 deletions

14
gather/src/items/Part.js Normal file
View File

@@ -0,0 +1,14 @@
const Api = require('../api')
module.exports = class Part {
constructor (set, part, amount) {
this.part = part
this.url = `${set}_prime_${part}`
this.amount = amount ?? 1
}
async getPrice () {
const orders = await Api.getSortedOrders(this.url)
return Number(orders[0].platinum) * this.amount
}
}