-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Kristjan Kirpu edited this page Feb 26, 2016
·
13 revisions
There are some examples available in the examples directory.
SteamMarketManager
is the root object that node-steam-market-manager
exports. You'll need to instantiate it.
var SteamMarketManager = require('steam-market-manager');
var market = new SteamMarketManager({
"appID": 730
});
-
options
- Optional. An object containing any or all of the following options:-
appID
- Optional. Will define the default application id when fetching market prices. -
currency
- Optional. Specifies in which currency the values should be. Defaults toEUR
, you can see all the available currencies here. -
keepCurrencySymbols
- Optional. Steam by default returns currency symbols too(ex. 12,99€)
. This defaults tofalse
and will remove the symbols. -
enableWebApi
- Optional. Defaults tofalse
, iftrue
then it will enable the WebApi using Express. -
webApiPort
- Optional. Defaults to1337
. This is the port the WebApi will be listening on. -
webApiSeperator
- Optional. Defaults to!N!
. This seperates the items when calling/items/:names
. -
cache
- Optional. Defaults tofalse
. Sets the time in seconds for how long to cache the item. Creates acache.json
file with all the items queried.- A good idea would be to set the cache time to 3600 seconds (1 hour) and call
getAllItems()
method.
- A good idea would be to set the cache time to 3600 seconds (1 hour) and call
-
-
name
- Required. Themarket_hash_name
for the item.(Ex. "StatTrak™ CZ75-Auto | The Fuschia Is Now (Well-Worn)" without quotes)
-
currency
- Optional. Will default to Constructor's value if not set. -
appID
- Optional. Will default to Constructor's value if not set. Required if you did not set the value in Constructor. -
callback
- Required.-
err
-null
on success. -
item
- Steam JSON response.
-
-
names
- Required. Object populated with itemmarket_hash_name
's -
currency
- Optional. Will default to Constructor's value if not set. -
appID
- Optional. Will default to Constructor's value if not set. Required if you did not set the value in Constructor. -
callback
- Required.-
err
-null
on success. -
items
- Steam JSON responses.
-
All returned values are in USD. If you wish to get EUR values etc.. you'll have to figure out that by yourself.
-
format
- Optional. Will default to JSON. -
appID
- Optional. Will default to Constructor's value if not set. Required if you did not set the value in Constructor. -
callback
- Required.-
err
-null
on success. -
items
- Backpack.tf response.
-
Gets the user inventory using node-steamcommunity
and adds the option to append priceData
to the inventory items.
-
steamid
- Required. Steam2 rendered ID, a Steam3 rendered ID or a SteamID64. -
contextID
- Required. Context within the app you want to load. -
appID
- Optional. Will default to Constructor's value if not set. Required if you did not set the value in Constructor. -
tradableOnly
- Optional. Defaults tofalse
. Fetches only the items that can be traded. -
getWithPrices
- Optional. Defaults tofalse
. Adds prices to items.- When dealing with large inventories
(20+ items)
I suggest you to usegetAllItems
before fetching with prices. Steam has an API limit forpriceoverview
.
- When dealing with large inventories
-
callback
- Required.-
err
-null
on success. Returns anError
object according tonode-steamcommunity
Wiki. -
inventory
- An array containingCEconItem
objects for the user's inventory items
-
Fetches item's price from Market using getItem
method. Uses the default constructor values.
Fetches multiple items prices from Market using getItems
method. Uses the default constructor values.
Fetches all items and their prices from Backpack.tf using getAllItems
method. Uses the default constructor values.