Add (disabled) sharedfile favorite support

This commit is contained in:
3urobeat 2023-05-12 23:30:10 +02:00
parent d807f10653
commit f09adc84a4
No known key found for this signature in database
GPG Key ID: 6842D80775A4E952

View File

@ -31,6 +31,28 @@ SteamCommunity.prototype.deleteSharedfileComment = function(userID, sid, cid, ca
}, "steamcommunity");
};
/**
* Favorites a sharedfile
* @param {String} sid - ID of the sharedfile
* @param {function} callback - Takes only an Error object/null as the first argument
*/
/* SteamCommunity.prototype.favoriteSharedfile = function(sid, callback) {
this.httpRequestPost({
"uri": "https://steamcommunity.com/sharedfiles/favorite",
"form": {
"id": sid,
"appid": , // TODO: How to get appid the sharedfile is associated to?
"sessionid": this.getSessionID()
}
}, function(err, response, body) {
if (!callback) {
return;
}
callback(null || err);
}, "steamcommunity");
}; */
/**
* Posts a comment to a sharedfile
* @param {SteamID | String} userID - ID of the user associated to this sharedfile
@ -85,6 +107,28 @@ Bot.prototype.subscribeSharedfileComments = function(userID, sid, callback) {
}, "steamcommunity");
};
/**
* Unfavorites a sharedfile
* @param {String} sid - ID of the sharedfile
* @param {function} callback - Takes only an Error object/null as the first argument
*/
/* SteamCommunity.prototype.unfavoriteSharedfile = function(sid, callback) {
this.httpRequestPost({
"uri": "https://steamcommunity.com/sharedfiles/unfavorite",
"form": {
"id": sid,
"appid": , // TODO: How to get appid the sharedfile is associated to?
"sessionid": this.getSessionID()
}
}, function(err, response, body) {
if (!callback) {
return;
}
callback(null || err);
}, "steamcommunity");
}; */
/**
* Unsubscribes from a sharedfile's comment section. Note: Checkbox on webpage does not update
* @param {SteamID | String} userID - ID of the user associated to this sharedfile