Office365 Calendar Recurring Event API - get only changes, updated & deleted - php

I have implemented Recurring Event with google api and I want to integrate office 365 calendar recurring as well, I can read the event from office 365 calendar api, but when I want to take only changed instances I can not find any api endpoint that return only changes like google does.
I'm using endpoints like:
GET https://graph.microsoft.com/me/calendars/{calendarId}/calendarview
GET https://graph.microsoft.com/me/calendars/{calendarId}/events
Endpoint 'events' return main recurring event, this is what I'm using to read the main event, and works fine.
Endpoint 'calendarView' returns all events calculated for recurring event, if is daily without end, it will return 365 events for whole year if you query that way.
The problem is I can't read updated or deleted instances for this recurring event. I tried delta/feed endpoint but returns everything without any status or information for updated or deleted instances/occurrences.
Does anyone have found any solution for this?
Thank you.

AFAIK, this is not supported currently. Being said that, consider filing user voice for your specific ask so that it could be considered for future implementation.

Related

Podio Calendar, how to get the calendar of a particular user

How can I get the calendar of a particular user?
Im working on a Podio-to-calendar implementation and want to do that, but so far, I had no positive results.
I can get all the events for workspace, app, etc using the examples and documentation in https://developers.podio.com/doc/calendar .
Is there any calendar method to get the data for a user across Podio?
In that case, can I get even the data that has been synced from another calendar, like the one in my google account? I have the feeling that those events are not saved as podio items at all, am i right?
For getting global calendar I'd start with https://developers.podio.com/doc/calendar/get-global-calendar-22458 method.
For linked account's calendars, you are right - Podio doesn't import event from them as items, they are only displayed on calendar. To get those you should use: https://developers.podio.com/doc/calendar/get-linked-account-calendar-78081299. And to get linked account, you will need this one: https://developers.podio.com/doc/linked-accounts

Is it possible to sync custom events data to separate google calendar account?

I have a restaurant reservation website build with Laravel and running for merchant and customer.
What I would like to do is, when customer successfully booked at merchant's restaurant, I would like to sync reservation data to "merchant's google calendar" as well as "customer's google calendar".
Is it possible to do with Google Calendar? If so what's the approach to do that?
What would be the seamless approach to sync data between their own calendar and my calendar (from my website)?
As far as I understand your use case from the comments, you actually need to do two different things:
1. Keep the merchant's calendar up to date
For this, a sync might indeed be the best solution. A Calendar API "sync" is just a usual read operation which includes a sync token you can use in later reads to reduce the number of needed operations. It is described in the docs.
2. Add the event to the customer's calendar
You do not want to sync your calendar with the customers' calendar here, just add one event. Of course, you can add an event via the API; however, a much better solution seems to be providing a link for the customer to add the event himself:
https://www.google.com/calendar/render?action=TEMPLATE&text=Your+Event+Name&dates=20150998T224000Z/20150998T221500Z&details=For+details,+link+here:+http://www.example.com&location=Waldorf+Astoria,+301+Park+Ave+,+New+York,+NY+10022&sf=true&output=xml
It is much easier technically, and the customer does not need to give you full access to his calendar (there is no write-only permission).

Fetch Recurring events with google calendar api v3 in php

I am using google calendar api v3 to fetch calendar events. But how to fetch all the recurring events. It just return single event with some hint like: DAILY;UNTIL=20 etc. Please help me out with this...
If you are using the Events: list API method, add the singleEvents=true parameter. From the API docs:
singleEvents
boolean
Whether to expand recurring events into
instances and only return single one-off events and instances of
recurring events, but not the underlying recurring events themselves.
Optional. The default is False.
If the event is a recurring event. You need to call another function in the API with the event ID and that will then return all the instances.
What does this mean
1) you get a normal even listing from the API.
2) then if you find an event that has ReccurenceID/Recurrence you can call the following with the EVENT ID. You can also specify parameters that you want to just like when searching for normal events (almost)
GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId/instances
Here is a nice blog post on it.
http://googleappsdeveloper.blogspot.com/2011/12/calendar-v3-best-practices-recurring.html
The google API page is at:
https://developers.google.com/google-apps/calendar/v3/reference/events/instances
Cheers
Peter

import the events i get invited to on facebook into my website using php

I would like to basically get all the events that i get invited to on facebook to feed my internal website DB with that info; lets say every day using a cron. the problem is that I think you can get the events if you are the one posting the event not the one receiving the invite.
am I wrong or can someone offer me some insight into how to get this accomplished
You can get the events you have not replied using me/events/not_replied or using Graph Api Explorer.
You can get all upcoming events that you have subscribed/accepted via me/events call. Graph APi Exlporer
and save the time in your db and use since parameter with that time to get latest subscribed events.
If you are running cron job then make sure you are not duplicating or missing some events.

Google Calendar sync with php in 2 ways

I am creating a php website that uses the Google Calendar API. It's working fine with Create, Update and Delete: any event from the PHP website goes into my Google Calendar events after login.
Events created on my site are created in Google Calendar.
What I want now that is: when I create an event from my test page it goes into Google Calendar after login, then if I update or delete that event from Google Calendar then it should automatically update or delete the php website event.
Basically: 1-way sync is working fine but now I want 2-way synchronization.
If anybody has any ideas then kindly share with me, it will be much appreciated.
There are no application hooks in Google Calendar (gCal) that allow you to trigger an action when an event is deleted. Instead you must either poll gCal at intervals (this could be a cron job every few minutes/hours) and update your calendar accordingly, or any time you perform an action from your calendar have a 1 in X possibly of a full re-sync.
This implies that you are using the gCal as the definitive source, and mirroring those changes back to your local application.
well, after following these answers and building a hole 2 way sync process,
i realized there's a push notifications for calendar since 2013.
you will still need a full sync process because the push notification only notifies about a change but no data about the change.
hope it will save you some time.
Push Notifications
Would it not be an option for your system to generate an iCal output at a special, user-specific URL, and then have the user subscribe to that calendar in Google Calendars (or their iCal-reading calendar of choice)?
That way, your system would always hold the authorative calendar, and Google Calendar would reflect any changes you make automatically.
Alternately, if you are wanting changes in the Google Calendar to be reflected in your application, then you may be able to subscribe to iCals for the User's Calendar, and then poll them at a regular interval to reflect any changes the User has made at that end.
I would lean towards the first option (your iCal subscribed through Google Calendar), as it is a simpler and easier solution.

Categories