How to fetch events just for the month and year displaying by the user? - fullcalendar

i use VueJS 3 with type script and Full Calendar V6.
I need to load events when user click on Next or Previous month/year.
I need to fetch events just for the month and year displaying by the user.
I dont want to make a query that retrieves all the events in the database.
I use the "events:" property in calendarOptions.
But the only way I found is to pass an asynchronous request to this property (events:). This property will then distribute the events properly in the calendar.
How to make a dynamic and parameterized request, according to the month and year consulted by the user?

Related

User's google calendar ID changes when primary email is updated

Essentially I've noticed that when a user's primary email is updated on their google account, their calendar ID will also change (e.g. ID will change from john#company.com to john_new#company.com).
This is a problem because I work on an application that relies on the calendar ID being a stable identifier for users. For example, lets say user A at a company schedules an event to their calendar through my application. We'll save metadata related to that event in our own database along with user A's calendar ID to denote that the event was scheduled to that calendar. This is important because we use this information to ensure that only users with write access to this calendar ID can edit this event from our application (important for security purposes).
Lets say user A gets their primary email updated, which causes their calendar ID to also change. Now, when I query the CalendarList endpoint to get a list of user A's calendars, I get back the new calendar ID, which makes my application think that user A should not have access to edit the event they just scheduled since that event was scheduled to a calendar ID that user A no longer has access to.
Is there a way around a problem like this? I can't find an endpoint that will return user A's "archived" calendar ID in addition to their new one. More deeply, I don't understand why their calendar ID changes as it feels like IDs should be stable identifiers...
In this case, by testing and working with the calendar API and Google Workspace it's a fact that the Calendar ID will always be the email address of the user account it’s associated with. I wish there was actual documentation but this is only from testing that I have verified this. There are other threads that explain the same, in this case with your situation you should modify your app in a way that the CalendarID is not based in a stable ID, as this depends on your email address.

Fullcalendar.io getEvent by date, or by extended property

Is there a way to find all recently-added events in the local memory using the default object property names, extended properties, or events on a specific date?
calendar.getEvents() gets everything calendar.getEventById() gets only specific IDs. Is it my job to filter that returned array?
Is it better to add user-created events to a different Event Source.... and use THAT source when constructing an object for the server?
How do I find all newly created events added by the user? And, how do I get all events for a specific date?

Report last login by user on Google Analytics

What would be the easiest way to get a report on Google Analytics containing authenticated users ordered by the last login time (the latest login first)?
We are already using Event logging with Category "User", Action "Login" and Label set to user ID (a GUID). Is it possible to base the report on this data?
UPDATE 5-Dec-2018:
As a reference, we have a Custom Report for top logins:
This shows:
Now, I would like to change 'Hits' to "the last time the event occurred", with the given Event Label.
You can create a custom report with the event label ordered by date and time. Though the default implementation in GA only gives you up to the hours I believe. If you want more granularity, I think you'd need to create a custom dimension with a timestamp to the second/millisecond and capture that data front-end.

Outlook events sent to a google calendar - event ids change unexpectedly?

I am creating a meeting series from an outlook client, on an office365 mailbox.
The invited user is on g-suite (email, calendar...).
My code connects to google calendar via the API and periodically checks of event changes \ new events \ cancelled etc.
I store the event ids in my database and use them to match to the event IDs I read from google calendar.
When a whole meeting series is changed - for instance a weekly series gets a new starting time - the event IDs returning from google calendar APIs - change!
I am not sure if the IDs are generated by office\outlook or by g-suite.
I am not sure what's the right way to match the events I stored with their old IDs, to the new events coming in.
If you read the Google API Documentation, it states that recurring events are composed of instances. The recurring event is a parent and individual instances are its children. Each child has a recurringEventId which identifies its parent. Their individual instance ids might change when they are changed.
See the following: https://developers.google.com/calendar/recurringevents#modifying_or_deleting_instances

Find an event in a calendar

I'm writing an app that reads a Google Sheet that I have read access to. This is working just fine. It contains upcoming dates for things. The sheet contains usually no more than 20 - 30 upcoming events. Events that have passed are ignored.
I need to take these upcoming events and add them to a calendar. Adding events is ok. The problem is that if the app runs again say a week later, the events that are already on the sheet are added again, so I need a way of searching for an event in a calendar based on the date of the event. If I find an event at that date and time, then I can ignore it and move to the next one. It seems that searching for an event requires a calendar ID and an event ID. Is there a way to search for an event by giving a date and time, and say a partial summary?
Failing that, any other options? The data in the Google Sheet I have read access to only. My app doesn't store anything locally. The intention is to read the sheet and add events but not add duplicate events.
To get events you either use events.get where you provide the calendarId and eventId to fetch a specific event or Events.list to get all events.

Resources