Mailjet API脚本

时间:2018-06-27 08:13:32

标签: node.js api mailjet

我在NodeJS中有一个脚本,该脚本在运行时会显示联系人列表:

Picture

我希望能够添加自定义属性。

我看到可以在站点Mailjet上直接添加它们,但是当我执行该操作时,它不会出现。

我的脚本:

var MailJet = require('node-mailjet');

var client = MailJet.connect('publickey', 'privatekey', {
    url: 'api.mailjet.com',
    version: 'v3',
});
// Workaround for https://github.com/mailjet/mailjet-apiv3-nodejs/issues/46
// client.config.perform_api_call = perform;

/
/ API call
console.log('Calling...');

client
    .get("contact")
    .request({
        // ID: 6180242,
        // Properties: {
        //     test: "test"
        // }

    }, function (err, res) {
        console.log(err)
        console.log(res.body)
        console.log('Done.')
        // cb(err);
    });

0 个答案:

没有答案