Added CSteamGroup.leave method

This commit is contained in:
Alexander Corn 2014-12-17 03:07:59 -05:00
parent 0cb5eef1f8
commit 8e8ce2aa89

View File

@ -115,6 +115,32 @@ CSteamGroup.prototype.join = function(callback) {
});
};
CSteamGroup.prototype.leave = function(callback) {
var form = {
"sessionID": this._community.getSessionID(),
"action": "leaveGroup",
"groupId": this.steamID.toString()
};
var self = this;
this._community._myProfile("home_process", 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);
});
};
CSteamGroup.prototype.postAnnouncement = function(headline, content, callback) {
var form = {
"sessionID": this._community.getSessionID(),