mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2024-12-29 16:10:12 +08:00
Adding .deleteComment()
This commit is contained in:
parent
e2dae00af2
commit
f7ebe68bd8
@ -117,3 +117,7 @@ CSteamGroup.prototype.getHistory = function(page, callback) {
|
||||
CSteamGroup.prototype.getAllComments = function(from, count, callback) {
|
||||
this._community.getAllGroupComments(this.steamID, from, count, callback);
|
||||
};
|
||||
|
||||
CSteamGroup.prototype.deleteComment = function(cid, callback) {
|
||||
this._community.deleteGroupComment(this.steamID, cid, callback);
|
||||
};
|
||||
|
@ -558,4 +558,27 @@ SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callba
|
||||
|
||||
callback(null, comments);
|
||||
}, "steamcommunity");
|
||||
};
|
||||
|
||||
SteamCommunity.prototype.deleteGroupComment = function(gid, cid, callback) {
|
||||
if(Number.isInteger(cid)) {
|
||||
callback("Pass the comment id as a string");
|
||||
}
|
||||
|
||||
var options = {
|
||||
uri: "http://steamcommunity.com/comment/Clan/delete/" + gid.getSteamID64() + "/-1/",
|
||||
form: {
|
||||
sessionid: this.getSessionID(),
|
||||
gidcomment: cid
|
||||
}
|
||||
};
|
||||
|
||||
var self = this;
|
||||
this.httpRequestPost(options, function(err, response, body) {
|
||||
if(!callback) {
|
||||
return;
|
||||
}
|
||||
|
||||
callback(err || null);
|
||||
}, "steamcommunity");
|
||||
};
|
Loading…
Reference in New Issue
Block a user