A module for interacting with the Steam store site from node.js. Currently it only manages adding and removing phone numbers.
This module cannot facilitate logins to the store site directly. You'll need to use something like
node-steam-user or
node-steamcommunity to login, and then use
setCookies to set your login cookies in this module.
The cookies are the same for the store site and for the community site.
v1.1.0 or later is required to use this property
A SteamID object for the currently logged-in user.
Constructs a new instance of steamstore. Example:
var SteamStore = require('steamstore');
var store = new SteamStore();cookie- The cookie, in "name=value" string format
Sets a single cookie to steamstore's internal cookie jar.
cookies- An array of cookies, in "name=value" string format
Simply calls setCookie for each cookie in the array.
Returns the value of the sessionid cookie, or creates a new random one and adds it to the cookie jar if not present.
number- Your phone number, with a leading plus and the country code- Example:
+18885550123
- Example:
bypassConfirmation-trueif you want to ignore any confirmation-level errors (see below). Defaultfalsecallback- A function to be called when the request completeserr- AnErrorobject on failure, ornullon success. Theconfirmationproperty will betrueif this is a confirmation-level error which can be overridden by settingbypassConfirmationtotrue
Adds a new phone number to your account. This triggers a verification SMS to be sent. You can provide the verification
code to verifyPhoneNumber to finalize the process.
callback- A function to be called when the request completeserr- AnErrorobject on failure, ornullon success
Asks the Steam servers to resend the verification SMS to your pending-confirmation phone number. This will fail if you request it too soon after the last SMS was sent.
code- Your SMS verification codecallback- A function to be called when the request completeserr- AnErrorobject on failure, ornullon success
Verify your pending-verification phone number using the SMS code.
callback- A function to be called when the request completeserr- AnErrorobject on failure, ornullon success
Starts the process to remove your phone number from your account. This will send an SMS verification code to your phone.
Call confirmRemovePhoneNumber with the code to finalize the process.
code- Your SMS verification codecallback- A function to be called when the request completeserr- AnErrorobject on failure, ornullon success
Finalizes the process of removing your phone number from your account.
callback- A function to be called when the request completeserr- AnErrorobject on failure, ornullon successhasPhone-trueif your account has a phone number linked,falseif notlastDigits- If you have a phone number, this is a string containing the last 4 digits of your number
v1.3.0 or later is required to use this method
Checks whether your account has a phone number linked or not.
callback- A function to be called when the request completeserr- AnErrorobject on failure, ornullon successownedApps- An array containing the AppID of each app which your account ownsownedPackages- An array containing the PackageID of each package which your account ownswishlist- An array containing the AppID of each app that's on your wishlistignoredApps- An array containing the AppID of each app which you've clicked "Not Interested" ontags- An object containing the tags which are suggested for you. Keys are TagIDs, values are the tag names.
v1.1.0 or later is required to use this method
Gets information about products that your account owns, ignores, wants, or is recommended.
giftID- The gift's ID (also known as the asset ID of the item in your Steam gift inventory)recipient- Either the recipient's email address (to send it over email) or the recipient's SteamID (as aSteamIDobject or string) to send it over Steam. If using a SteamID, you need to be friends with the user.recipientName- The name of the recipient to put in the gift email/popupmessage- The message to include in the email/popupclosing- The closing to include in the email/popupsignature- Your name to include in the email/popupcallback- Optional. Called when the request completes.err- AnErrorobject on failure, ornullon success
v1.4.0 or later is required to use this method
Sends a Steam gift in your inventory to another user. The gift will remain in your inventory until the recipient accepts it. You can re-send a gift which you've already sent. Gifts don't have to be tradable in order to be sent.
walletCode- The Steam wallet code you want to redeemcallback- Optional. Called when the request completes.err- AnErrorobject if the request fails (http error, or response malformed)result- The result of the request. An object containing two keys:EResultcontaining a value fromSteamStore.EResultenums andEPurchaseResultcontaining a value fromSteamStore.EPurchaseResultenumsredeemed- A boolean, true if the wallet code was successfully redeemed
v1.4.2 or later is required to use this method
Attempts to redeem a Steam Wallet code.