Open waxapi opened 5 years ago
I'm leaving this here for anyone who needed the getAllItemPrices() to allow app_id as a parameter.
let getItemPrices = function (app_id, simple) { function arrayToObject(object, item) { object[item.market_hash_name] = item.price; return object; } return api.makeRequest('get_all_item_prices', { app_id }, (body) => { if (simple) { body.prices = body.prices.reduce(arrayToObject, {}); } return body.prices; }); }
I'm leaving this here for anyone who needed the getAllItemPrices() to allow app_id as a parameter.