doc.md

October 1, 2020 · View on GitHub

SteamApis

SteamApis

Kind: global class

new SteamApis(apiKey, [options])

A SteamApis instance

ParamTypeDescription
apiKeystringYour steamapis.com apikey
[options]ObjectOptional options for the api
[options.inventoryApi]ObjectThe settings to pass into the steam-inventory-api-ng constructor when the instance gets created

steamApis.getInventory(steamid, appid, contextid, [tradableOnly], [retries]) ⇒ Promise

Get the contents of a users inventory. Designed to be the same as DoctorMcKay's getUserInventoryContents from node-steamcommunity (without language support and with retries).

Kind: instance method of SteamApis
Returns: Promise - Promise object containing an object with keys: inventory, currency and total_inventory_count - with inventory and currency being an array of CEconItem objects.

ParamTypeDefaultDescription
steamidSteamID | stringSteamID object from node-steamid or a string which can be parsed into a SteamID object
appidintThe Steam application ID of the app
contextidintThe ID of the context within the app you wish to retrieve
[tradableOnly]booleantrue to get only tradeable items and currencies
[retries]number1How many calls to make to an inventory before rejecting. If an inventory is private or not found this value is ignored and an error is thrown after the first request.

steamApis.getProfileData(steamid) ⇒ Promise

Fetches Steam's profile endpoint and returns detailed information about the user and its inventory contexts. For more information: https://steamapis.com/docs/steam#profile

Kind: instance method of SteamApis
Returns: Promise - Promise object with steamapis raw response

ParamTypeDescription
steamidSteamID | stringSteamID object from node-steamid or a string which can be parsed into a SteamID object

steamApis.getMarketStats() ⇒ Promise

Returns the data that displayed on the front page of steamapis.com.

Kind: instance method of SteamApis
Returns: Promise - Promise object with steamapis raw response

steamApis.getDataForApp(appid) ⇒ Promise

Returns detailed data about any app from the steamapis.com database. For more information: https://steamapis.com/docs/market#app

Kind: instance method of SteamApis
Returns: Promise - Promise object with steamapis raw response

ParamTypeDescription
appidintIdentifier of the application

steamApis.getDataForAllApps() ⇒ Promise

Returns all apps from the steamapis.com database. For more information: https://steamapis.com/docs/market#apps

Kind: instance method of SteamApis
Returns: Promise - Promise object with steamapis raw response

steamApis.getItemFromApp(appid, market_hash_name) ⇒ Promise

Returns detailed data about any item from the steamapis.com database. For more information: https://steamapis.com/docs/market#item

Kind: instance method of SteamApis
Returns: Promise - Promise object with steamapis raw response

ParamTypeDescription
appidintIdentifier of the application for the item you wish to fetch
market_hash_namestringThe value of the market hash name of the item you wish to fetch

steamApis.getItemsForApp(appid, [compactValue]) ⇒ Promise

Return price details for items that belong to an appid from the steamapis.com database. For more information: https://steamapis.com/docs/market#items

Kind: instance method of SteamApis
Returns: Promise - Promise object with steamapis raw response

ParamTypeDescription
appidintIdentifier of the application for the item you wish to fetch
[compactValue]boolean | stringChanges the return values for items, if true uses steamapis.com's default

steamApis.getAllCards() ⇒ Promise

Return price details for all monitored Steam cards from the steamapis.com database. For more information: https://steamapis.com/docs/market#cards

Kind: instance method of SteamApis
Returns: Promise - Promise object with steamapis raw response

steamApis.getImageRedirectForItem(appid, market_hash_name) ⇒ Promise

Redirects to the image of specified item if it exists on the steamapis.com database, else an error is returned. For more information: https://steamapis.com/docs/images#item

Kind: instance method of SteamApis
Returns: Promise - Promise object with steamapis raw response

ParamTypeDescription
appidintIdentifier of the application for the image you wish to fetch
market_hash_namestringThe value of the market hash name of the image you wish to fetch

steamApis.getAllImagesForApp(appid) ⇒ Promise

Returns all item images on the steamapis.com database that belong to the specified application. For more information: https://steamapis.com/docs/images#items

Kind: instance method of SteamApis
Returns: Promise - Promise object with steamapis raw response

ParamTypeDescription
appidintIdentifier of the application for the images you wish to fetch