mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2024-12-28 07:30:09 +08:00
commit
e05efabcb9
@ -123,6 +123,10 @@ CSteamGroup.prototype.deleteComment = function(cid, callback) {
|
||||
this._community.deleteGroupComment(this.steamID, cid, callback);
|
||||
};
|
||||
|
||||
CSteamGroup.prototype.comment = function(message, callback) {
|
||||
this._community.postGroupComment(this.steamID, message, callback);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get requests to join this restricted group.
|
||||
* @param {function} callback - First argument is null/Error, second is array of SteamID objects
|
||||
|
@ -591,6 +591,30 @@ SteamCommunity.prototype.deleteGroupComment = function(gid, cid, callback) {
|
||||
}, "steamcommunity");
|
||||
};
|
||||
|
||||
SteamCommunity.prototype.postGroupComment = function(gid, message, callback) {
|
||||
if (typeof gid === 'string') {
|
||||
gid = new SteamID(gid);
|
||||
}
|
||||
|
||||
var options = {
|
||||
"uri": "https://steamcommunity.com/comment/Clan/post/" + gid.getSteamID64() + "/-1/",
|
||||
"form": {
|
||||
"comment": message,
|
||||
"count": 6,
|
||||
"sessionid": this.getSessionID()
|
||||
}
|
||||
};
|
||||
|
||||
var self = this;
|
||||
this.httpRequestPost(options, function(err, response, body) {
|
||||
if(!callback) {
|
||||
return;
|
||||
}
|
||||
|
||||
callback(err || null);
|
||||
}, "steamcommunity");
|
||||
};
|
||||
|
||||
/**
|
||||
* Get requests to join a restricted group.
|
||||
* @param {SteamID|string} gid - The SteamID of the group you want to manage
|
||||
|
Loading…
Reference in New Issue
Block a user