Status Update
Comments
jk...@google.com <jk...@google.com>
de...@jobhunt.co.il <de...@jobhunt.co.il> #2
[Comment deleted]
Ar...@webshed.co.il <Ar...@webshed.co.il> #3
Please also add
getAllEvents()
(without "startTime" and "endTime" parameters)
getAllEvents()
(without "startTime" and "endTime" parameters)
gr...@gmail.com <gr...@gmail.com> #4
A getEventById method would be an optimal alternative to cycling through all events retrieved with a date range, which is the only method possible on GAS currently.
is...@sutoiku.com <is...@sutoiku.com> #6
I concur with Greg.
db...@gmail.com <db...@gmail.com> #7
There has continued to be interest in the original report of this issue, which should have been here. I count 11 notes added to Issue 36753052 since Jun 27, 2012 (the last time a note was added here).
This is still an issue, and should be addressed.
This is still an issue, and should be addressed.
er...@gmail.com <er...@gmail.com> #8
I, too, could use/need getEventById(). I was part of the previous thread (#395) that was closed as completed. I'm glad to see that people are still asking for this.
je...@gmail.com <je...@gmail.com> #9
+1
I am coming from: Issue 36753052
Google, all I'm really looking for is clarity.
If you say, "tough noogies, use getEventSeriesById" that's fine. Make it clear in the documentation.
Are we missing some core concept of the Event and Event Series interaction? Does this just need a better explaination and use cases?
As it is it just seems like there is a gaping hole of: "HEY LOOK. There should be a function here but we do not support that concept." Please make it clear or let us know that you plan to implement the feature.
That said, I do support the implementation of the method instead of using a workaround.
I am coming from:
Google, all I'm really looking for is clarity.
If you say, "tough noogies, use getEventSeriesById" that's fine. Make it clear in the documentation.
Are we missing some core concept of the Event and Event Series interaction? Does this just need a better explaination and use cases?
As it is it just seems like there is a gaping hole of: "HEY LOOK. There should be a function here but we do not support that concept." Please make it clear or let us know that you plan to implement the feature.
That said, I do support the implementation of the method instead of using a workaround.
[Deleted User] <[Deleted User]> #10
I would imagine that offering a getEventById to allow setTime,etc would outway the consumption of server traffic for deletion and new allocation of resources.
Not only did the lack of clarity generate frustration, but no birthday cake for a year=old issue really topped it off!
It's at times likes these that my five year-old's wisdom rings loud: "It's not hard!"
Not only did the lack of clarity generate frustration, but no birthday cake for a year=old issue really topped it off!
It's at times likes these that my five year-old's wisdom rings loud: "It's not hard!"
[Deleted User] <[Deleted User]> #11
getEventSeriesById isn't the same result as a potential getEventById
an alternative could be getEvents(start, end, {id: eventId}) of course…
an alternative could be getEvents(start, end, {id: eventId}) of course…
ri...@gmail.com <ri...@gmail.com> #12
Same story here.
This is a bit complicated and unnecesasry:
var events = CalendarApp.getDefaultCalendar().getEventsForDay(date);
for (var e=0; e<events.length; e++) {
if (events[e].getId()==id) {
var event = events[e]
var title = event.getTitle();
var end = event.getEndTime();
var start = event.getStartTime();
var desc = event.getDescription();
var id = event.getId();
var loc = event.getLocation();
var day = start.getDay();
var thisevent = {"title":title,"start":start,"end":end,"location":loc,"id":id,"desc":desc};
}
}
kw...@gmail.com <kw...@gmail.com> #13
A year and a half later, is there still no solution for this?
ko...@gmail.com <ko...@gmail.com> #14
db...@gmail.com <db...@gmail.com> #15
For anyone who isn't ready to switch from CalendarApp to the Advanced Calendar service, there is a getEventById() function provided in this answer:
http://stackoverflow.com/a/30657751/1677912
Description
The object it returns is an event series, rather than an event, so methods like .setTime and .setAllDayDate are unavailable.
For example, the only workaround if I just want to change an all-day event to a new date is:
calendar.getEventSeriesById(eventId).setRecurrence(CalendarApp.newRecurrence().addWeeklyRule().times(1), startTimeStamp);
This sets it up as a recurring event with only one recurrence.
Seems like a common need to be able to grab an existing event and change it's date, so the need for a getEventById method remains...