Kelvin
Kelvin

Reputation: 43

Synchronize database data with google calendar using google calendar api

Currently, I'm able to retrieve the events from google calendar for specific calendar e.g. primary calendar. I have referred to this link https://developers.google.com/google-apps/calendar/quickstart/php#prerequisites for retrieving of events from google calendar.

However, the thing I want is I want when there is a new data/event in the database, it will insert the event that is from database to the google calendar. Similarly, when the data/event is deleted from the database, the same data/event at google calendar will be removed as well. Besides that, when there is a update in event of the database. e.g. changing event title from A to B. therefore, the same event in google calendar should updated as well. In other word, the database data should be synchronize with google calendar.

The screenshot below is the data in database. enter image description here

The links below are for get,insert,delete, update events in google calendar.

https://developers.google.com/google-apps/calendar/v3/reference/events/get

https://developers.google.com/google-apps/calendar/v3/reference/events/insert

https://developers.google.com/google-apps/calendar/v3/reference/events/delete

https://developers.google.com/google-apps/calendar/v3/reference/events/update

Any kind help is greatly appreciated, Thank you.

Upvotes: 2

Views: 9372

Answers (1)

최대한
최대한

Reputation: 1

CLIENT_ID, CLIENT_SECRET, API_KEY are required for synchronization first. There is a function that can connect to google calendar as if it prints the data stored in DB. Kelvin, I do not know where you add the data, If you are adding a data DB on the web screen, add the colum value needed to insert the DB in the function shown below.

Upvotes: 0

Related Questions