steamcommunity 3.41.8 → 3.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/FUNDING.yml +2 -2
- package/.idea/codeStyles/Project.xml +0 -3
- package/.idea/codeStyles/codeStyleConfig.xml +1 -0
- package/.idea/copyright/profiles_settings.xml +2 -2
- package/.idea/inspectionProfiles/Project_Default.xml +10 -10
- package/.idea/jsLibraryMappings.xml +5 -5
- package/.idea/misc.xml +5 -5
- package/.idea/modules.xml +8 -7
- package/.idea/steamcommunity.iml +9 -8
- package/.idea/vcs.xml +6 -5
- package/README.md +23 -23
- package/classes/CConfirmation.js +35 -35
- package/classes/CEconItem.js +120 -120
- package/classes/CMarketItem.js +189 -189
- package/classes/CMarketSearchResult.js +89 -89
- package/classes/CSteamGroup.js +155 -155
- package/classes/CSteamUser.js +8 -0
- package/components/chat.js +283 -283
- package/components/groups.js +732 -732
- package/components/help.js +64 -0
- package/components/http.js +150 -150
- package/components/inventoryhistory.js +188 -188
- package/components/market.js +387 -214
- package/components/twofactor.js +159 -159
- package/components/users.js +767 -667
- package/components/webapi.js +57 -73
- package/examples/disable_twofactor.js +62 -62
- package/examples/edit-group-announcement.js +118 -118
- package/examples/enable_twofactor.js +112 -112
- package/index.js +35 -2
- package/package.json +1 -1
- package/resources/EFriendRelationship.js +23 -0
- package/resources/EPersonaState.js +2 -2
- package/resources/EPersonaStateFlag.js +6 -1
- package/resources/EResult.js +14 -0
package/components/webapi.js
CHANGED
|
@@ -1,73 +1,57 @@
|
|
|
1
|
-
var SteamCommunity = require('../index.js');
|
|
2
|
-
|
|
3
|
-
SteamCommunity.prototype.getWebApiKey = function(domain, callback) {
|
|
4
|
-
var self = this;
|
|
5
|
-
this.httpRequest({
|
|
6
|
-
"uri": "https://steamcommunity.com/dev/apikey?l=english",
|
|
7
|
-
"followRedirect": false
|
|
8
|
-
}, function(err, response, body) {
|
|
9
|
-
if (err) {
|
|
10
|
-
callback(err);
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if(body.match(/<h2>Access Denied<\/h2>/)) {
|
|
15
|
-
return callback(new Error("Access Denied"));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if(body.match(/You must have a validated email address to create a Steam Web API key./)) {
|
|
19
|
-
return callback(new Error("You must have a validated email address to create a Steam Web API key."));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
var match = body.match(/<p>Key: ([0-9A-F]+)<\/p>/);
|
|
23
|
-
if(match) {
|
|
24
|
-
// We already have an API key registered
|
|
25
|
-
callback(null, match[1]);
|
|
26
|
-
} else {
|
|
27
|
-
// We need to register a new API key
|
|
28
|
-
self.httpRequestPost('https://steamcommunity.com/dev/registerkey?l=english', {
|
|
29
|
-
"form": {
|
|
30
|
-
"domain": domain,
|
|
31
|
-
"agreeToTerms": "agreed",
|
|
32
|
-
"sessionid": self.getSessionID(),
|
|
33
|
-
"Submit": "Register"
|
|
34
|
-
}
|
|
35
|
-
}, function(err, response, body) {
|
|
36
|
-
if (err) {
|
|
37
|
-
callback(err);
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
self.getWebApiKey(domain, callback);
|
|
42
|
-
}, "steamcommunity");
|
|
43
|
-
}
|
|
44
|
-
}, "steamcommunity");
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated No longer works if not logged in via mobile login. Will be removed in a future release.
|
|
49
|
-
* @param {function} callback
|
|
50
|
-
*/
|
|
51
|
-
SteamCommunity.prototype.getWebApiOauthToken = function(callback) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
// Pull an oauth token from the webchat UI
|
|
59
|
-
this.httpRequest("https://steamcommunity.com/chat", function(err, response, body) {
|
|
60
|
-
if (err) {
|
|
61
|
-
callback(err);
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
var match = body.match(/"([0-9a-f]{32})"/);
|
|
66
|
-
if (!match) {
|
|
67
|
-
callback(new Error("Malformed response"));
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
callback(null, match[1]);
|
|
72
|
-
}, "steamcommunity");
|
|
73
|
-
};
|
|
1
|
+
var SteamCommunity = require('../index.js');
|
|
2
|
+
|
|
3
|
+
SteamCommunity.prototype.getWebApiKey = function(domain, callback) {
|
|
4
|
+
var self = this;
|
|
5
|
+
this.httpRequest({
|
|
6
|
+
"uri": "https://steamcommunity.com/dev/apikey?l=english",
|
|
7
|
+
"followRedirect": false
|
|
8
|
+
}, function(err, response, body) {
|
|
9
|
+
if (err) {
|
|
10
|
+
callback(err);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if(body.match(/<h2>Access Denied<\/h2>/)) {
|
|
15
|
+
return callback(new Error("Access Denied"));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if(body.match(/You must have a validated email address to create a Steam Web API key./)) {
|
|
19
|
+
return callback(new Error("You must have a validated email address to create a Steam Web API key."));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var match = body.match(/<p>Key: ([0-9A-F]+)<\/p>/);
|
|
23
|
+
if(match) {
|
|
24
|
+
// We already have an API key registered
|
|
25
|
+
callback(null, match[1]);
|
|
26
|
+
} else {
|
|
27
|
+
// We need to register a new API key
|
|
28
|
+
self.httpRequestPost('https://steamcommunity.com/dev/registerkey?l=english', {
|
|
29
|
+
"form": {
|
|
30
|
+
"domain": domain,
|
|
31
|
+
"agreeToTerms": "agreed",
|
|
32
|
+
"sessionid": self.getSessionID(),
|
|
33
|
+
"Submit": "Register"
|
|
34
|
+
}
|
|
35
|
+
}, function(err, response, body) {
|
|
36
|
+
if (err) {
|
|
37
|
+
callback(err);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
self.getWebApiKey(domain, callback);
|
|
42
|
+
}, "steamcommunity");
|
|
43
|
+
}
|
|
44
|
+
}, "steamcommunity");
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated No longer works if not logged in via mobile login. Will be removed in a future release.
|
|
49
|
+
* @param {function} callback
|
|
50
|
+
*/
|
|
51
|
+
SteamCommunity.prototype.getWebApiOauthToken = function(callback) {
|
|
52
|
+
if (this.oAuthToken) {
|
|
53
|
+
return callback(null, this.oAuthToken);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
callback(new Error('This operation requires an OAuth token, which can only be obtained from node-steamcommunity\'s `login` method.'));
|
|
57
|
+
};
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
// If you aren't running this script inside of the repository, replace the following line with:
|
|
2
|
-
// const SteamCommunity = require('steamcommunity');
|
|
3
|
-
const SteamCommunity = require('../index.js');
|
|
4
|
-
const ReadLine = require('readline');
|
|
5
|
-
|
|
6
|
-
let community = new SteamCommunity();
|
|
7
|
-
let rl = ReadLine.createInterface({
|
|
8
|
-
input: process.stdin,
|
|
9
|
-
output: process.stdout
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
rl.question('Username: ', (accountName) => {
|
|
13
|
-
rl.question('Password: ', (password) => {
|
|
14
|
-
rl.question('Two-Factor Auth Code: ', (authCode) =>{
|
|
15
|
-
rl.question('Revocation Code: R', (rCode) => {
|
|
16
|
-
doLogin(accountName, password, authCode, '', rCode);
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
function doLogin(accountName, password, authCode, captcha, rCode) {
|
|
23
|
-
community.login({
|
|
24
|
-
accountName: accountName,
|
|
25
|
-
password: password,
|
|
26
|
-
twoFactorCode: authCode,
|
|
27
|
-
captcha: captcha
|
|
28
|
-
}, (err, sessionID, cookies, steamguard) => {
|
|
29
|
-
if (err) {
|
|
30
|
-
if (err.message == 'SteamGuard') {
|
|
31
|
-
console.log('This account does not have two-factor authentication enabled.');
|
|
32
|
-
process.exit();
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (err.message == 'CAPTCHA') {
|
|
37
|
-
console.log(err.captchaurl);
|
|
38
|
-
rl.question('CAPTCHA: ', (captchaInput) => {
|
|
39
|
-
doLogin(accountName, password, authCode, captchaInput);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
console.log(err);
|
|
46
|
-
process.exit();
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
console.log('Logged on!');
|
|
51
|
-
community.disableTwoFactor('R' + rCode, (err) => {
|
|
52
|
-
if (err) {
|
|
53
|
-
console.log(err);
|
|
54
|
-
process.exit();
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
console.log('Two-factor authentication disabled!');
|
|
59
|
-
process.exit();
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
}
|
|
1
|
+
// If you aren't running this script inside of the repository, replace the following line with:
|
|
2
|
+
// const SteamCommunity = require('steamcommunity');
|
|
3
|
+
const SteamCommunity = require('../index.js');
|
|
4
|
+
const ReadLine = require('readline');
|
|
5
|
+
|
|
6
|
+
let community = new SteamCommunity();
|
|
7
|
+
let rl = ReadLine.createInterface({
|
|
8
|
+
input: process.stdin,
|
|
9
|
+
output: process.stdout
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
rl.question('Username: ', (accountName) => {
|
|
13
|
+
rl.question('Password: ', (password) => {
|
|
14
|
+
rl.question('Two-Factor Auth Code: ', (authCode) =>{
|
|
15
|
+
rl.question('Revocation Code: R', (rCode) => {
|
|
16
|
+
doLogin(accountName, password, authCode, '', rCode);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
function doLogin(accountName, password, authCode, captcha, rCode) {
|
|
23
|
+
community.login({
|
|
24
|
+
accountName: accountName,
|
|
25
|
+
password: password,
|
|
26
|
+
twoFactorCode: authCode,
|
|
27
|
+
captcha: captcha
|
|
28
|
+
}, (err, sessionID, cookies, steamguard) => {
|
|
29
|
+
if (err) {
|
|
30
|
+
if (err.message == 'SteamGuard') {
|
|
31
|
+
console.log('This account does not have two-factor authentication enabled.');
|
|
32
|
+
process.exit();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (err.message == 'CAPTCHA') {
|
|
37
|
+
console.log(err.captchaurl);
|
|
38
|
+
rl.question('CAPTCHA: ', (captchaInput) => {
|
|
39
|
+
doLogin(accountName, password, authCode, captchaInput);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
console.log(err);
|
|
46
|
+
process.exit();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
console.log('Logged on!');
|
|
51
|
+
community.disableTwoFactor('R' + rCode, (err) => {
|
|
52
|
+
if (err) {
|
|
53
|
+
console.log(err);
|
|
54
|
+
process.exit();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
console.log('Two-factor authentication disabled!');
|
|
59
|
+
process.exit();
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
}
|
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
var SteamCommunity = require('../index.js');
|
|
2
|
-
var ReadLine = require('readline');
|
|
3
|
-
|
|
4
|
-
var community = new SteamCommunity();
|
|
5
|
-
var rl = ReadLine.createInterface({
|
|
6
|
-
"input": process.stdin,
|
|
7
|
-
"output": process.stdout
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
rl.question("Username: ", function(accountName) {
|
|
11
|
-
rl.question("Password: ", function(password) {
|
|
12
|
-
doLogin(accountName, password);
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
function doLogin(accountName, password, authCode, twoFactorCode, captcha) {
|
|
17
|
-
community.login({
|
|
18
|
-
"accountName": accountName,
|
|
19
|
-
"password": password,
|
|
20
|
-
"authCode": authCode,
|
|
21
|
-
"twoFactorCode": twoFactorCode,
|
|
22
|
-
"captcha": captcha
|
|
23
|
-
}, function(err, sessionID, cookies, steamguard) {
|
|
24
|
-
if(err) {
|
|
25
|
-
if(err.message == 'SteamGuardMobile') {
|
|
26
|
-
rl.question("Steam Authenticator Code: ", function(code) {
|
|
27
|
-
doLogin(accountName, password, null, code);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if(err.message == 'SteamGuard') {
|
|
34
|
-
console.log("An email has been sent to your address at " + err.emaildomain);
|
|
35
|
-
rl.question("Steam Guard Code: ", function(code) {
|
|
36
|
-
doLogin(accountName, password, code);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if(err.message == 'CAPTCHA') {
|
|
43
|
-
console.log(err.captchaurl);
|
|
44
|
-
rl.question("CAPTCHA: ", function(captchaInput) {
|
|
45
|
-
doLogin(accountName, password, authCode, twoFactorCode, captchaInput);
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
console.log(err);
|
|
52
|
-
process.exit();
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
console.log("Logged on!");
|
|
57
|
-
|
|
58
|
-
rl.question("Group ID: ", function(gid) {
|
|
59
|
-
community.getSteamGroup(gid, function(err, group) {
|
|
60
|
-
if (err) {
|
|
61
|
-
console.log(err);
|
|
62
|
-
process.exit(1);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
group.getAllAnnouncements(function(err, announcements) {
|
|
66
|
-
|
|
67
|
-
if(announcements.length === 0) {
|
|
68
|
-
return console.log("This group has no announcements");
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
for (var i = announcements.length - 1; i >= 0; i--) {
|
|
72
|
-
console.log("[%s] %s %s: %s", announcements[i].date, announcements[i].aid, announcements[i].author, announcements[i].content);
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
rl.question("Would you like to delete delete or edit an annoucement? (Type edit/delete): ", function(choice) {
|
|
76
|
-
rl.question("Annoucement ID: ", function(aid) {
|
|
77
|
-
if(choice === 'edit') {
|
|
78
|
-
rl.question("New title: ", function(header) {
|
|
79
|
-
rl.question("New body: ", function(content) {
|
|
80
|
-
// EW THE PYRAMID!
|
|
81
|
-
// Try replace this with delete!
|
|
82
|
-
editAnnouncement(group, aid, header, content);
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
} else {
|
|
86
|
-
deleteAnnouncement(group, aid);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function editAnnouncement(group, aid, header, content) {
|
|
97
|
-
// Actual community method.
|
|
98
|
-
group.editAnnouncement(aid, header, content, function(error) {
|
|
99
|
-
if(!error) {
|
|
100
|
-
console.log("Annoucement edited!");
|
|
101
|
-
} else {
|
|
102
|
-
console.log("Unable to edit annoucement! %j", error);
|
|
103
|
-
process.exit(1);
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function deleteAnnouncement(group, aid) {
|
|
109
|
-
// group.deleteAnnouncement(aid);
|
|
110
|
-
// Or
|
|
111
|
-
group.deleteAnnouncement(aid, function(err) {
|
|
112
|
-
if(!err) {
|
|
113
|
-
console.log("Deleted");
|
|
114
|
-
} else {
|
|
115
|
-
console.log("Error deleting announcement.");
|
|
116
|
-
}
|
|
117
|
-
})
|
|
118
|
-
}
|
|
1
|
+
var SteamCommunity = require('../index.js');
|
|
2
|
+
var ReadLine = require('readline');
|
|
3
|
+
|
|
4
|
+
var community = new SteamCommunity();
|
|
5
|
+
var rl = ReadLine.createInterface({
|
|
6
|
+
"input": process.stdin,
|
|
7
|
+
"output": process.stdout
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
rl.question("Username: ", function(accountName) {
|
|
11
|
+
rl.question("Password: ", function(password) {
|
|
12
|
+
doLogin(accountName, password);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
function doLogin(accountName, password, authCode, twoFactorCode, captcha) {
|
|
17
|
+
community.login({
|
|
18
|
+
"accountName": accountName,
|
|
19
|
+
"password": password,
|
|
20
|
+
"authCode": authCode,
|
|
21
|
+
"twoFactorCode": twoFactorCode,
|
|
22
|
+
"captcha": captcha
|
|
23
|
+
}, function(err, sessionID, cookies, steamguard) {
|
|
24
|
+
if(err) {
|
|
25
|
+
if(err.message == 'SteamGuardMobile') {
|
|
26
|
+
rl.question("Steam Authenticator Code: ", function(code) {
|
|
27
|
+
doLogin(accountName, password, null, code);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if(err.message == 'SteamGuard') {
|
|
34
|
+
console.log("An email has been sent to your address at " + err.emaildomain);
|
|
35
|
+
rl.question("Steam Guard Code: ", function(code) {
|
|
36
|
+
doLogin(accountName, password, code);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if(err.message == 'CAPTCHA') {
|
|
43
|
+
console.log(err.captchaurl);
|
|
44
|
+
rl.question("CAPTCHA: ", function(captchaInput) {
|
|
45
|
+
doLogin(accountName, password, authCode, twoFactorCode, captchaInput);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
console.log(err);
|
|
52
|
+
process.exit();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
console.log("Logged on!");
|
|
57
|
+
|
|
58
|
+
rl.question("Group ID: ", function(gid) {
|
|
59
|
+
community.getSteamGroup(gid, function(err, group) {
|
|
60
|
+
if (err) {
|
|
61
|
+
console.log(err);
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
group.getAllAnnouncements(function(err, announcements) {
|
|
66
|
+
|
|
67
|
+
if(announcements.length === 0) {
|
|
68
|
+
return console.log("This group has no announcements");
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
for (var i = announcements.length - 1; i >= 0; i--) {
|
|
72
|
+
console.log("[%s] %s %s: %s", announcements[i].date, announcements[i].aid, announcements[i].author, announcements[i].content);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
rl.question("Would you like to delete delete or edit an annoucement? (Type edit/delete): ", function(choice) {
|
|
76
|
+
rl.question("Annoucement ID: ", function(aid) {
|
|
77
|
+
if(choice === 'edit') {
|
|
78
|
+
rl.question("New title: ", function(header) {
|
|
79
|
+
rl.question("New body: ", function(content) {
|
|
80
|
+
// EW THE PYRAMID!
|
|
81
|
+
// Try replace this with delete!
|
|
82
|
+
editAnnouncement(group, aid, header, content);
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
} else {
|
|
86
|
+
deleteAnnouncement(group, aid);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function editAnnouncement(group, aid, header, content) {
|
|
97
|
+
// Actual community method.
|
|
98
|
+
group.editAnnouncement(aid, header, content, function(error) {
|
|
99
|
+
if(!error) {
|
|
100
|
+
console.log("Annoucement edited!");
|
|
101
|
+
} else {
|
|
102
|
+
console.log("Unable to edit annoucement! %j", error);
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function deleteAnnouncement(group, aid) {
|
|
109
|
+
// group.deleteAnnouncement(aid);
|
|
110
|
+
// Or
|
|
111
|
+
group.deleteAnnouncement(aid, function(err) {
|
|
112
|
+
if(!err) {
|
|
113
|
+
console.log("Deleted");
|
|
114
|
+
} else {
|
|
115
|
+
console.log("Error deleting announcement.");
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
}
|