import { Aweber } from "api-aweber"
let aweber = new Aweber({
"consumerKey": "xxx",
"consumerSecret": "yyy",
"accessKey": "zzz",
"accessSecret": "qqq",
})
let accountId = 666555777
let listId = 12345678
let data = {
email: "test@example.com",
ip: "127.0.0.1",
ad_tracking: "my AD",
misc_notes: "Node API client"
}
aweber.addSubscriber(accountId,listId,data).then(ok => {
if(ok) console.log("Subscriber added!")
}).catch(err => {
console.log(err)
})
This lib Doc: Documentation
Aweber official API doc: Aweber API