steamutils 1.2.39 → 1.2.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +34 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -6019,6 +6019,40 @@ class SteamUser {
|
|
|
6019
6019
|
return null
|
|
6020
6020
|
}
|
|
6021
6021
|
}
|
|
6022
|
+
|
|
6023
|
+
async sellItem({
|
|
6024
|
+
appid = 730,
|
|
6025
|
+
contextid = 2,
|
|
6026
|
+
assetid,
|
|
6027
|
+
amount = 1,
|
|
6028
|
+
price
|
|
6029
|
+
}) {
|
|
6030
|
+
price = parseInt(price)
|
|
6031
|
+
if (!price) {
|
|
6032
|
+
return
|
|
6033
|
+
}
|
|
6034
|
+
|
|
6035
|
+
const response = (await this._httpRequestAjax({
|
|
6036
|
+
url: `market/sellitem`,
|
|
6037
|
+
data: {
|
|
6038
|
+
appid: appid,
|
|
6039
|
+
contextid: contextid,
|
|
6040
|
+
assetid: assetid,
|
|
6041
|
+
amount: amount,
|
|
6042
|
+
price: price,
|
|
6043
|
+
}
|
|
6044
|
+
}))?.data
|
|
6045
|
+
|
|
6046
|
+
return response
|
|
6047
|
+
|
|
6048
|
+
const resultExample = {
|
|
6049
|
+
"success": true,
|
|
6050
|
+
"requires_confirmation": 1,
|
|
6051
|
+
"needs_mobile_confirmation": true,
|
|
6052
|
+
"needs_email_confirmation": false,
|
|
6053
|
+
"email_domain": "gmail.com"
|
|
6054
|
+
}
|
|
6055
|
+
}
|
|
6022
6056
|
}
|
|
6023
6057
|
|
|
6024
6058
|
export default SteamUser
|