{
"auth": {
"apiKey": "[your API key here]",
"clientId": "[your client ID here]",
"discoveryDocs": [
"https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest"
],
"scope": "https://www.googleapis.com/auth/calendar.readonly"
},
"calendars": [
{
"id": "[Room 1 calendar ID here]",
"label": "Room 1"
},
{
"id": "[Room 2 calendar ID here]",
"label": "Room 2"
}
],
"interval": 10000,
"modelUrl": "http://example.com/model.obj",
"renderResources": true
}
auth
: Object that holds the information of the Google Calendar API credentials.
calendars
: Array of objects, each with a calendar id
(unique identifier of the Google Calendar resource) and a calendar label
(display name for the calendar).
interval
: Number of milliseconds between each calendar update.
modelUrl
: URL to the 3D model for the 3D view. This model must be a .obj
3D model and to allow the proper highlighting of each room, room submodels must be identified the same labels described in the objects of the calendars
array.
renderResources
: Boolean to indicate whether the event resources should be rendered in the event card.
- Access Google APIs console.
- Create a new project (if you don't have one already).
- In the Dashboard, click "ENABLE APIS AND SERVICES".
- Select and enable "Google Calendar API".
- In the Google Calendar API view, click "Credentials" on the left and then "Create credentials" > "API key". You will use this key in your settings.
- Click "RESTRICT KEY".
- Name? meeting-room-dashboard.
- API restrictions? Restrict key: Google Calendar API.
- In "OAuth consent screen":
- Application name? meeting-room-dashboard.
- Authorized domains? mnixo.github.io.
- Save.
- Click "Create credentials" > "OAuth client ID".
- Application type? Web application.
- Name? meeting-room-dashboard.
- Authorized JavaScript origins:
- https://mnixo.github.io (for the GitHub pages hosted one)
- http://localhost:8081 (to run locally)
- Authorized redirect URIs:
- https://mnixo.github.io (for the GitHub pages hosted one)
- http://localhost:8081 (to run locally)
- Save. You will use the provided client ID in your settings.
- Go to your Google Calendar view.
- On the left you'll find "My calendars" and "Other calendars", if you have any. You can add more calendars by searching in the "Meet with..." section.
- Hovering a calendar, click the options icon and then "Settings".
- Look for "Calendar ID".