-
Notifications
You must be signed in to change notification settings - Fork 0
getSubscribers
Matthew Grist edited this page Nov 14, 2022
·
2 revisions
getSubscribers()
- version 1.0.0
The getSubscribers
method is used to return the list of members that are paying the $20.00 subscription to ACM.
-
Input Parameters: none.
- Return Type: object[] - on success, an array of member objects (if no matches then an empty array). On error, an error message.
- Important Note: this method cannot be called before the login method.
const Chapter = require("acm-roster");
async function main() {
// creating new client
const client = new Chapter();
try {
// log in to chapters ACM account
await client.login("acm-username", "acm-password");
const subs = client.getSubscribers();
if (subs.length === 0)
console.log("need more subscribers!");
} catch (err) {
throw err;
}
}