Google Calendar
To use the 'calendar' content type, you need a helper script, using Google Apps Script. To use Google Apps Script to get all events for the next day and return them via JSON in a web app, you can follow these steps:
-
Create a new Google Apps Script project by going to https://script.google.com and clicking on "New project".
-
Paste the content of the calendar.js file into the editor This App Script calls the
getEventsForNextDay()function to get the events in JSON format, creates a text output with the JSON content, sets the MIME type to JSON, and returns the output. -
Deploy the web app by clicking on "Deploy > New Deployment" in the script editor
-
Choose "Web app" as the deployment type
-
Set 'run as' to 'me', and the access to "Anyone, even anonymous"
-
click on "Deploy"
-
Make sure to take note of the web app URL generated by Google.
-
Test the web app by visiting the web app URL in a web browser. You should see the events for the next day in JSON format.