3.3.0 • Published 6 years ago
steamcommunity-market v3.3.0
steamcommunity-market
Handy library that requests data from steamcommunity market API.
Instalation
It's simple, just type in:
npm install steamcommunity-marketFor more stable version:
npm install steamcommunity-market@3.0.3Docs
CommunityMarket
Main production class.
new CommunityMarket(options)
| Param | Type | Default | Description |
|---|---|---|---|
| options | object | ||
| options.http | object | HTTP setting default, look at request docs. | |
| options.localization | object | Default localization settings. | |
| options.localization.currency | ECMCurrencyCodes | 1 | |
| options.localization.country | string | "'us'" | Country name shortened. |
| options.localization.language | string | "'en'" | Language name shortened. |
| options.histogram | object | Histogram default settings. | |
| options.listings | object | Listing default settings. | |
| options.search | object | Search default settings. |
communityMarket.getHistogram()
See: Params.prototype.getLocalization For localization parameters.
| Param | Type | Default | Description |
|---|---|---|---|
| params.itemNameID | string | Item market hash name. | |
| params.twoFactor | string | 0 | Unknown setting. |
Gets histogram parameters for CommunityMarket.
communityMarket.getListings()
See: Params.prototype.getLocalization For localization parameters.
| Param | Type | Default | Description |
|---|---|---|---|
| params.start | number | 0 | Starting point. |
| params.count | number | void | If void fetches all listings, otherwise by number. | |
| params.query | string | void | Description query search. |
Gets CommunityMarket item listings.
communityMarket.getOverview()
| Param | Type | Default | Description |
|---|---|---|---|
| params.marketHashName | string | Steam name that is included in the url. | |
| params.appid | number | Game ID on steam. | |
| params.currency | ECMCurrencyCodes | 1 |
Gets overview for CommunityMarket item.
communityMarket.search(params)
| Param | Type | Default | Description |
|---|---|---|---|
| params | object | {} | Can also include other appid specific parameters. |
| params.query | string | "''" | |
| params.start | number | 0 | Search start. |
| params.count | number | How many do we want, if void searches for all. | |
| params.searchDescriptions | boolean | false | If we want to search descriptions of items. |
| params.sortColumn | string | "'price'" | Which column get items sorted by. |
| params.sortDir | string | "'asc'" | Which direction. |
| params.appid | number | Game ID on steam. |
Searches the CommunityMarket.
communityMarket.getPriceHistory()
See: Params.prototype.getLocalization For localization parameters.
| Param | Type | Description |
|---|---|---|
| params.marketHashName | string | Steam name that is included in the url. |
| params.appid | number | Game ID on steam. |
Gets sale history. Currently does not work.