From f7d7cf0660c5a15fc24ca770afeb3f9e40936403 Mon Sep 17 00:00:00 2001 From: 3urobeat <35304405+HerrEurobeat@users.noreply.github.com> Date: Mon, 15 May 2023 22:42:22 +0200 Subject: [PATCH] Remove support for up- & downvoting sharedfiles --- classes/CSteamSharedfile.js | 16 -------------- components/sharedfiles.js | 42 ------------------------------------- 2 files changed, 58 deletions(-) diff --git a/classes/CSteamSharedfile.js b/classes/CSteamSharedfile.js index 8401cd6..432f09a 100644 --- a/classes/CSteamSharedfile.js +++ b/classes/CSteamSharedfile.js @@ -204,19 +204,3 @@ CSteamSharedfile.prototype.unfavorite = function(callback) { CSteamSharedfile.prototype.unsubscribe = function(callback) { this._community.unsubscribeSharedfileComments(this.owner, this.id, callback); }; - -/** - * Downvotes this sharedfile - * @param {function} callback - Takes only an Error object/null as the first argument - */ -CSteamSharedfile.prototype.voteDown = function(callback) { - this._community.voteDownSharedfile(this.id, callback); -}; - -/** - * Upvotes this sharedfile - * @param {function} callback - Takes only an Error object/null as the first argument - */ -CSteamSharedfile.prototype.voteUp = function(callback) { - this._community.voteUpSharedfile(this.id, callback); -}; \ No newline at end of file diff --git a/components/sharedfiles.js b/components/sharedfiles.js index 3ef690a..00a754c 100644 --- a/components/sharedfiles.js +++ b/components/sharedfiles.js @@ -155,45 +155,3 @@ SteamCommunity.prototype.unsubscribeSharedfileComments = function(userID, sid, c callback(null || err); }, "steamcommunity"); }; - -/** - * Downvotes a sharedfile - * @param {String} sid - ID of the sharedfile - * @param {function} callback - Takes only an Error object/null as the first argument - */ -SteamCommunity.prototype.voteDownSharedfile = function(sid, callback) { - this.httpRequestPost({ - "uri": "https://steamcommunity.com/sharedfiles/votedown", - "form": { - "id": sid, - "sessionid": this.getSessionID() - } - }, function(err, response, body) { - if (!callback) { - return; - } - - callback(null || err); - }, "steamcommunity"); -}; - -/** - * Upvotes a sharedfile - * @param {String} sid - ID of the sharedfile - * @param {function} callback - Takes only an Error object/null as the first argument - */ -SteamCommunity.prototype.voteUpSharedfile = function(sid, callback) { - this.httpRequestPost({ - "uri": "https://steamcommunity.com/sharedfiles/voteup", - "form": { - "id": sid, - "sessionid": this.getSessionID() - } - }, function(err, response, body) { - if (!callback) { - return; - } - - callback(null || err); - }, "steamcommunity"); -}; \ No newline at end of file