我是 Node js 的新手。下面是我写的代码。它没有显示任何输出。
const pdClient = require('node-pagerduty');
const pdApiKey = 'XXXXXXXXXXXXXX';
const pd = new pdClient(pdApiKey);
let from = 'XXXXXXXXXX@XXX.com';
let payload = {
user: {
type: 'user',
name: 'test',
email: 'test@gmail.com',
role: 'Manager'
}
};
var res = pd.users.createUser(from, payload);
console.log(res);