steamutils 1.2.39 → 1.2.41

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.
Files changed (2) hide show
  1. package/index.js +35 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -6019,6 +6019,41 @@ 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
+ method: "POST"
6045
+ }))?.data
6046
+
6047
+ return response
6048
+
6049
+ const resultExample = {
6050
+ "success": true,
6051
+ "requires_confirmation": 1,
6052
+ "needs_mobile_confirmation": true,
6053
+ "needs_email_confirmation": false,
6054
+ "email_domain": "gmail.com"
6055
+ }
6056
+ }
6022
6057
  }
6023
6058
 
6024
6059
  export default SteamUser
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.39",
3
+ "version": "1.2.41",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.4.0",