API design of the system
Let us do a basic API design for our services:
1. Display info for each user.
@GET /api/users/{userId}
For Scheduled Meetings or Events
2. Get meetings for the user for the current week
@GET /api/users/{userId}/meetings
{
date: currentDate,
days: 7
}
3. Creating the meeting Event
@POST /api/users/{userId}/meetings
{
startTime: anyStartTime,
endTime: anyEndTime,
“users”: [“abc@gmail.com”,”xyz@gmail.com”],
“subject”: “Important Meeting”,
“meetingBody”: “Let’s have a stand-up”
}
4. Updating a meeting Event
PUT /api/users/{userId}/meetings/{meetingId}
{
startTime: anyStartTime,
endTime: anyEndTime,,
“users”: [“abc@gmail.com”, “xyz@gmail.com”],
“subject” : “Meeting Cancelled”,
“meetingBody”: “Let’s have a stand-up”
}
For Reminders
A reminder consists of:
- When to show the reminder, expressed minutes before the event starts time.
- The delivery method to use.
Reminders can be specified for whole calendars and for individual events. Users can set default reminders for each of their calendars; these defaults apply to all events within that calendar. However, users can also override these defaults for individual events, replacing them with a different set of reminders.
5. Setting up the default meeting reminder
“reminders“: {
“useDefault“: false,
# Overrides can be set if and only if useDefault is false.
“overrides“: [
{
“method“: “reminderMethod”,
“minutes“: “reminderMinutes”
},
# …
]
}
The delivery methods offered by the system are:
- Pop-up: These are supported on mobile platforms and on web clients.
- Email: Sent by the server.
System Design – Design Google Calendar
Google Calendar is like a special calendar that we can use on our computer or phone. We can use it to remember important things, like birthdays, appointments, and events. We can also set reminders to help us remember when something is coming up soon. We can also share our calendars with our family or friends. It’s like having our own special schedule that helps us keep track of everything that we need to do.
With Google Calendar, we can quickly schedule meetings and events and get reminders about upcoming activities, so we always know what’s next.