Skip to content

Latest commit

 

History

History
144 lines (102 loc) · 7.46 KB

doc.md

File metadata and controls

144 lines (102 loc) · 7.46 KB

SteamApis

SteamApis

Kind: global class

new SteamApis(apiKey, [options])

A SteamApis instance

Param Type Description
apiKey string Your steamapis.com apikey
[options] Object Optional options for the api
[options.inventoryApi] Object The 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.

Param Type Default Description
steamid SteamID | string SteamID object from node-steamid or a string which can be parsed into a SteamID object
appid int The Steam application ID of the app
contextid int The ID of the context within the app you wish to retrieve
[tradableOnly] boolean true to get only tradeable items and currencies
[retries] number 1 How 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

Param Type Description
steamid SteamID | string SteamID 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

Param Type Description
appid int Identifier 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

Param Type Description
appid int Identifier of the application for the item you wish to fetch
market_hash_name string The 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

Param Type Description
appid int Identifier of the application for the item you wish to fetch
[compactValue] boolean | string Changes 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

Param Type Description
appid int Identifier of the application for the image you wish to fetch
market_hash_name string The 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

Param Type Description
appid int Identifier of the application for the images you wish to fetch