mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2024-12-29 16:10:12 +08:00
Added deleting events in CSteamGroup (#109)
* Added deleteEvent() * Added deleteGroupEvent()
This commit is contained in:
parent
beaf012846
commit
17e5b94782
@ -98,6 +98,10 @@ CSteamGroup.prototype.editEvent = function(id, name, type, description, time, se
|
||||
this._community.editGroupEvent(this.steamID, id, name, type, description, time, server, callback);
|
||||
};
|
||||
|
||||
CSteamGroup.prototype.deleteEvent = function (id, callback) {
|
||||
this._community.deleteGroupEvent(this.steamID, id, callback);
|
||||
};
|
||||
|
||||
CSteamGroup.prototype.setPlayerOfTheWeek = function(steamID, callback) {
|
||||
this._community.setGroupPlayerOfTheWeek(this.steamID, steamID, callback);
|
||||
};
|
||||
|
@ -344,6 +344,30 @@ SteamCommunity.prototype.editGroupEvent = function (gid, id, name, type, descrip
|
||||
}, "steamcommunity");
|
||||
};
|
||||
|
||||
SteamCommunity.prototype.deleteGroupEvent = function(gid, id, callback) {
|
||||
if (typeof gid === 'string') {
|
||||
gid = new SteamID(gid);
|
||||
}
|
||||
|
||||
var form = {
|
||||
"sessionid": this.getSessionID(),
|
||||
"action": "deleteEvent",
|
||||
"eventID": id
|
||||
};
|
||||
|
||||
var self = this;
|
||||
this.httpRequestPost({
|
||||
"uri": "https://steamcommunity.com/gid/" + gid.toString() + "/eventEdit",
|
||||
"form": form
|
||||
}, function(err, response, body) {
|
||||
if(!callback) {
|
||||
return;
|
||||
}
|
||||
|
||||
callback(err || null);
|
||||
}, "steamcommunity");
|
||||
};
|
||||
|
||||
SteamCommunity.prototype.setGroupPlayerOfTheWeek = function(gid, steamID, callback) {
|
||||
if(typeof gid === 'string') {
|
||||
gid = new SteamID(gid);
|
||||
|
Loading…
Reference in New Issue
Block a user