Reputation: 253
I have searched everywere and I am not able to find a proper resource where creating event in outlook-calender is done.Please,can someone provide me the code which creates a outlook-calender using Node.js
Upvotes: 1
Views: 6197
Reputation: 2834
https://github.com/jasonjoh/node-outlook or https://www.npmjs.com/package/node-outlook looks like what you need. This library provides a light-weight implementation of the Outlook Mail, Calendar, and Contacts APIs.
Sample code to create an event.
var outlook = require('node-outlook');
var newEvent = {
"Subject": "Discuss the Calendar REST API",
"Body": {
"ContentType": "HTML",
"Content": "I think it will meet our requirements!"
},
};
let createEventParameters = {
token: ['access token will come here'],
event: newEvent
};
outlook.calendar.createEvent(createEventParameters, function (error, event) {
if(error) {
console.log(error);
} else {
console.log(event);
}
});
Upvotes: 3
Reputation: 4889
https://github.com/jasonjoh/node-outlook looks like what you need. It requires Microsoft Office 365 APIs Client Libraries for Cordova Applications but that's pretty expected.
Upvotes: 0