Added CSteamGroup.kick method

This commit is contained in:
Alexander Corn 2014-12-17 02:42:15 -05:00
parent d257108500
commit 7643d2efad

View File

@ -208,3 +208,30 @@ CSteamGroup.prototype.setPlayerOfTheWeek = function(steamID, callback) {
});
});
};
CSteamGroup.prototype.kick = function(steamID, callback) {
var form = {
"sessionID": this._community.getSessionID(),
"action": "kick",
"memberId": steamID.toString(),
"queryString": ""
};
var self = this;
this._community._request.post("https://steamcommunity.com/gid/" + this.steamID.toString() + "/membersManage", {"form": form}, function(err, response, body) {
if(!callback) {
return;
}
if(err || response.statusCode >= 400) {
callback(err || "HTTP error " + response.statusCode);
return;
}
if(self._community._checkCommunityError(body, callback)) {
return;
}
callback(null);
});
};