steamcommunity 3.43.1 → 3.44.0
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/.idea/codeStyles/Project.xml +0 -3
- package/.idea/codeStyles/codeStyleConfig.xml +1 -0
- package/.idea/modules.xml +1 -0
- package/.idea/steamcommunity.iml +1 -0
- package/.idea/vcs.xml +1 -0
- package/classes/CSteamGroup.js +155 -155
- package/components/confirmations.js +425 -425
- package/components/help.js +64 -61
- package/components/market.js +387 -269
- package/components/profile.js +475 -475
- package/components/users.js +767 -767
- package/index.js +589 -589
- package/package.json +1 -1
package/components/help.js
CHANGED
|
@@ -1,61 +1,64 @@
|
|
|
1
|
-
const SteamCommunity = require('../index.js');
|
|
2
|
-
|
|
3
|
-
const Helpers = require('./helpers.js');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
1
|
+
const SteamCommunity = require('../index.js');
|
|
2
|
+
|
|
3
|
+
const Helpers = require('./helpers.js');
|
|
4
|
+
|
|
5
|
+
const HELP_SITE_DOMAIN = 'https://help.steampowered.com';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Restore a previously removed steam package from your steam account.
|
|
9
|
+
* @param {int|string} packageID
|
|
10
|
+
* @param {function} callback
|
|
11
|
+
*/
|
|
12
|
+
SteamCommunity.prototype.restorePackage = function(packageID, callback) {
|
|
13
|
+
this.httpRequestPost({
|
|
14
|
+
uri: HELP_SITE_DOMAIN + '/wizard/AjaxDoPackageRestore',
|
|
15
|
+
form: {
|
|
16
|
+
packageid: packageID,
|
|
17
|
+
sessionid: this.getSessionID(HELP_SITE_DOMAIN),
|
|
18
|
+
wizard_ajax: 1
|
|
19
|
+
},
|
|
20
|
+
json: true
|
|
21
|
+
}, wizardAjaxHandler(callback));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Remove a steam package from your steam account.
|
|
26
|
+
* @param {int|string} packageID
|
|
27
|
+
* @param {function} callback
|
|
28
|
+
*/
|
|
29
|
+
SteamCommunity.prototype.removePackage = function(packageID, callback) {
|
|
30
|
+
this.httpRequestPost({
|
|
31
|
+
uri: HELP_SITE_DOMAIN + '/wizard/AjaxDoPackageRemove',
|
|
32
|
+
form: {
|
|
33
|
+
packageid: packageID,
|
|
34
|
+
sessionid: this.getSessionID(HELP_SITE_DOMAIN),
|
|
35
|
+
wizard_ajax: 1
|
|
36
|
+
},
|
|
37
|
+
json: true
|
|
38
|
+
}, wizardAjaxHandler(callback));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Returns a handler for wizard ajax HTTP requests.
|
|
43
|
+
* @param {function} callback
|
|
44
|
+
* @returns {(function(*=, *, *): void)|*}
|
|
45
|
+
*/
|
|
46
|
+
function wizardAjaxHandler(callback) {
|
|
47
|
+
return (err, res, body) => {
|
|
48
|
+
if (!callback) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (err) {
|
|
53
|
+
callback(err);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (!body.success) {
|
|
58
|
+
callback(body.errorMsg ? new Error(body.errorMsg) : Helpers.eresultError(body.success));
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
callback(null);
|
|
63
|
+
};
|
|
64
|
+
}
|