const start = dateTime 2023-03-29T100000 timeZone AsiaKolkata ; const end = dateTime 2023-03-30T120000 timeZone AsiaKolkata ; Create the even
convert the above request to Axios:
const start = { dateTime: '2023-03-29T10:00:00', timeZone: 'Asia/Kolkata' };
const end = { dateTime: '2023-03-30T12:00:00', timeZone: 'Asia/Kolkata' };
const newEvent = { subject: 'update event', start: start, end: end, location: { displayName: 'my pateince is wainnig is this enterainning eiieieieieiei' } };
const eventsid = 'AQMkADAwATM0MDAAMS0wN2MxLTA5OQEtMDACLTAwCgBGAAAD3Jp6csMMfEq-e4ZaytWkhwcAZVb67ggNQE2EdprKAgVfAQAAAgENAAAAZVb67ggNQE2EdprKAgVfAQAE7aONcAAAAA==';
const options = {
method: 'patch',
url: https://graph.microsoft.com/v1.0/me/events/${eventsid},
headers: {
Authorization: 'Bearer ' + token
},
data: newEvent
};
console.log("options", options);
axios(options) .then(response => { console.log('Event created successfully:', response); }) .catch(error => { console.error(error); });
原文地址: https://www.cveoy.top/t/topic/JUv 著作权归作者所有。请勿转载和采集!