how to get the ColorID of a Google Calendar Event in JavaScript -


i want write script duplicate events 1 google calendar another, events colored in bold red.

as stands now, can duplicate events between multiple calendars, don't know how colorid event, bold red events being duplicated. such thing possible in javascript of using google script?

i searched multiple times in past days, can find answers based on php. honest, can't imagine such thing not possible through javascript of google script.

here script wrote far:

 function myfunction() }
var calendarsource = calendarapp.getcalendarbyid("calendaridprimarycalendar@gmail.com"); var calendardest = calendarapp.getcalendarbyid("calendaridduplicatedcalendar@group.calendar.google.com"); var today = new date(); //deze variabele bevat de datum van vandaag var halfyear = new date(new date(today).setmonth(today.getmonth() + 6));//deze variabele bevat dat datum van vandaag + 6 maanden var eventtocopy = calendarsource.getevents(today, halfyear); //deze variabele bevat alle calendar events voor het aankomende half jaar

// nieuwe events aanmaken. (var in eventtocopy){ var newevent = calendardest.createevent(eventtocopy[i].gettitle(), eventtocopy[i].getstarttime(), eventtocopy[i].getendtime()); } }

what want add if statement (or something), checks events have got colorid 11 going duplicated.

can me?

thanks in advance,

jackuss

if check documentation of google calendar api, explain here basic explanation on how color works on calendar api, can check here description of different property name here.

the colors.get gives different example code.

now, javascript or apps script code want, think sample code calendar apps script documentation can give idea on how use colorid

function createevent() { var calendarid = 'primary'; var start = getrelativedate(1, 12); var end = getrelativedate(1, 13); var event = { summary: 'lunch meeting', location: 'the deli', description: 'to discuss our plans presentation next week.', start: { datetime: start.toisostring() }, end: { datetime: end.toisostring() }, attendees: [ {email: 'alice@example.com'}, {email: 'bob@example.com'} ], // red background. use calendar.colors.get() full list. colorid: 11 }; event = calendar.events.insert(event, calendarid); logger.log('event id: ' + event.getid()); } 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -