mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-04 07:36:55 +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) {
|
CSteamGroup.prototype.getAllComments = function(from, count, callback) {
|
||||||
this._community.getAllGroupComments(this.steamID, from, count, callback);
|
this._community.getAllGroupComments(this.steamID, from, count, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CSteamGroup.prototype.deleteComment = function(cid, callback) {
|
||||||
|
this._community.deleteGroupComment(this.steamID, cid, callback);
|
||||||
|
};
|
||||||
|
@ -559,3 +559,26 @@ SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callba
|
|||||||
callback(null, comments);
|
callback(null, comments);
|
||||||
}, "steamcommunity");
|
}, "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