-
-
Notifications
You must be signed in to change notification settings - Fork 128
CConfirmation
A class which represents an outstanding confirmation on your account.
v3.12.1 or later is required to use anything relating to confirmations
The ID of this confirmation. This is not the same as a trade offer ID.
v3.25.0 or later is required to use this property
What type of thing this confirmation wants to confirm. The enum is available as a property of SteamCommunity.
v3.25.0 or later is required to use this property
The ID of the thing that created this confirmation (trade offer ID for a trade, market listing ID for a market listing).
The key for this confirmation. This is required when confirming or canceling the confirmation. This is not the same as the TOTP confirmation key.
The title of this confirmation.
A textual description of what you will receive from this confirmation, if this is a trade. If this is a market listing, then this is empty.
v3.45.1 or later is required to use this property
A textual description of what you will lose from this confirmation, if this is a trade. If this is a market listing, then this is a string containing the name of the item you're listing on the market.
A textual description of when this confirmation was created.
v3.45.2 or later is required to use this property
A Date
object of when this confirmation was created.
The URL to your trading partner's avatar, if this is a trade. The URL to the image of the item, if this is a market listing. Otherwise, an empty string.
-
time
- The Unix timestamp with which the following key was generated -
key
- The confirmation key that was generated using the preceeding time and the tag "details" (this key can be reused). You can usesteam-totp
to generate this. -
callback
- Called when the request completes-
err
- AnError
object on failure, ornull
on success -
offerID
- The ID of the trade offer this is confirming, ornull
if not a confirmation for a trade offer
-
Gets the ID of the trade offer that this confirmation is confirming, if it's for a trade.
Prior to v3.25.0, this makes an HTTP request to Steam. At and after v3.25.0, this simply grabs the creator
property from the confirmation. It's unnecessary to use this method since v3.25.0, and so it's deprecated.
-
time
- The Unix timestamp with which the following key was generated -
key
- The confirmation key that was generated using the preceeding time and the tag "allow" (if accepting) or "cancel" (if declining). You can usesteam-totp
to generate this. -
accept
-true
if you are accepting,false
if you are canceling -
callback
- Called when the request completes-
err
- AnError
object on failure, ornull
on success
-
Accept or decline the confirmation.
Example:
// assume that "confirmation" is a CConfirmation object, and we want to approve it
// also assume that identitySecret is your account's "identity_secret"
var SteamTotp = require('steam-totp');
var time = SteamTotp.time();
var confKey = SteamTotp.getConfirmationKey(identitySecret, time, "allow");
confirmation.respond(time, confKey, true, function(err) {
if (err) {
console.log("Cannot accept confirmation: " + err.message);
} else {
console.log("Confirmation accepted successfully");
}
});