Update non-object methods to take appid param

This commit is contained in:
3urobeat 2023-05-14 15:07:23 +02:00
parent 9ec5dcd7b0
commit d6b0fbd5d0
No known key found for this signature in database
GPG Key ID: 6842D80775A4E952

View File

@ -34,14 +34,15 @@ SteamCommunity.prototype.deleteSharedfileComment = function(userID, sid, cid, ca
/** /**
* Favorites a sharedfile * Favorites a sharedfile
* @param {String} sid - ID of the sharedfile * @param {String} sid - ID of the sharedfile
* @param {String} appid - ID of the app associated to this sharedfile
* @param {function} callback - Takes only an Error object/null as the first argument * @param {function} callback - Takes only an Error object/null as the first argument
*/ */
/* SteamCommunity.prototype.favoriteSharedfile = function(sid, callback) { SteamCommunity.prototype.favoriteSharedfile = function(sid, appid, callback) {
this.httpRequestPost({ this.httpRequestPost({
"uri": "https://steamcommunity.com/sharedfiles/favorite", "uri": "https://steamcommunity.com/sharedfiles/favorite",
"form": { "form": {
"id": sid, "id": sid,
"appid": , // TODO: How to get appid the sharedfile is associated to? "appid": appid,
"sessionid": this.getSessionID() "sessionid": this.getSessionID()
} }
}, function(err, response, body) { }, function(err, response, body) {
@ -51,7 +52,7 @@ SteamCommunity.prototype.deleteSharedfileComment = function(userID, sid, cid, ca
callback(null || err); callback(null || err);
}, "steamcommunity"); }, "steamcommunity");
}; */ };
/** /**
* Posts a comment to a sharedfile * Posts a comment to a sharedfile
@ -110,14 +111,15 @@ SteamCommunity.prototype.subscribeSharedfileComments = function(userID, sid, cal
/** /**
* Unfavorites a sharedfile * Unfavorites a sharedfile
* @param {String} sid - ID of the sharedfile * @param {String} sid - ID of the sharedfile
* @param {String} appid - ID of the app associated to this sharedfile
* @param {function} callback - Takes only an Error object/null as the first argument * @param {function} callback - Takes only an Error object/null as the first argument
*/ */
/* SteamCommunity.prototype.unfavoriteSharedfile = function(sid, callback) { SteamCommunity.prototype.unfavoriteSharedfile = function(sid, appid, callback) {
this.httpRequestPost({ this.httpRequestPost({
"uri": "https://steamcommunity.com/sharedfiles/unfavorite", "uri": "https://steamcommunity.com/sharedfiles/unfavorite",
"form": { "form": {
"id": sid, "id": sid,
"appid": , // TODO: How to get appid the sharedfile is associated to? "appid": appid,
"sessionid": this.getSessionID() "sessionid": this.getSessionID()
} }
}, function(err, response, body) { }, function(err, response, body) {
@ -127,7 +129,7 @@ SteamCommunity.prototype.subscribeSharedfileComments = function(userID, sid, cal
callback(null || err); callback(null || err);
}, "steamcommunity"); }, "steamcommunity");
}; */ };
/** /**
* Unsubscribes from a sharedfile's comment section. Note: Checkbox on webpage does not update * Unsubscribes from a sharedfile's comment section. Note: Checkbox on webpage does not update