mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-02-06 05:34:41 +08:00
Add (disabled) sharedfile favorite support
This commit is contained in:
parent
d807f10653
commit
f09adc84a4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user