@dsyncerek/node-steam-prices

MongoDB collection with Steam prices.

Last updated 2 years ago by dsyncerek .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @dsyncerek/node-steam-prices 
SYNC missed versions from official npm registry.

Steam Prices for Node.js

MongoDB collection with Steam prices.

Installation

npm i @dsyncerek/node-steam-prices

Configuration

const SteamPrices = module.exports('your mongodb connection url', {
    interval: 8, // update every 8 hours
    tableName: 'steam_items'
});

You need to provide function that transforms api resopnse to array of items with name and price property.

SteamPrices.addProvider('https://api.csgofast.com/price/all', data => {
    let _ret = [];
    for (let p in data) if (data.hasOwnProperty(p)) _ret.push({name: p, price: data[p]});
    return _ret;
});

SteamPrices.addProvider('https://api.opskins.com/IPricing/GetAllLowestListPrices/v1/?appid=730', data => {
    data = data.response;
    let _ret = [];
    for (let p in data) if (data.hasOwnProperty(p)) _ret.push({name: p, price: data[p].price / 100});
    return _ret;
});

prices.update();

Usage

SteamPrices.getItem('AWP | Dragon Lore (Factory New)').then(data => console.log(data));

Current Tags

  • 3.0.0                                ...           latest (2 years ago)

5 Versions

  • 3.0.0 [deprecated]           ...           2 years ago
  • 2.0.1 [deprecated]           ...           2 years ago
  • 2.0.0 [deprecated]           ...           2 years ago
  • 1.1.0 [deprecated]           ...           2 years ago
  • 1.0.0 [deprecated]           ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 5
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |