This repository was archived by the owner on May 15, 2024. It is now read-only.
This repository was archived by the owner on May 15, 2024. It is now read-only.
[Spec] Calendar Read-Only API #996
Closed as not planned
Description
Calendar Read-Only API
Calendar API for reading calendar/event information seamlessly across uwp, iOS and Android
API
Calendar
Methods
API | Description |
---|---|
Task<IEnumerable<DeviceCalendar>> GetCalendarsAsync() |
Retrieve all calendars for device |
Task<IEnumerable<DeviceEvent>> GetEventsAsync( string calendarId = null, DateTimeOffset? startDate = null, DateTimeOffset? endDate = null) |
Retrieve all events for a specified range/calendar, null will use defaults: calendarId will default to all Calendars retrieved, startDate will default to use, DefaultStartDate , endDate will default to use DefaultEndDate |
Task<DeviceEvent> GetEventByIdAsync(string eventId) |
Gets more detailed information about a specific event by the event id |
Classes
public class DeviceCalendar
{
string Id { get; set; }
string Name { get; set; }
}
public class DeviceEvent
{
string Id { get; set; }
string CalendarId { get; set; }
string Title { get; set; }
string Description { get; set; }
string Location { get; set; }
bool AllDay { get; set; }
DateTimeOffset? Start { get; set; }
DateTimeOffset? End { get; set; }
TimeSpan? Duration { get; set; }
IReadOnlyList<DeviceEventAttendee> Attendees { get; set; }
}
public class DeviceEventAttendee
{
string Name { get; set; }
string Email { get; set; }
}
Scenarios
- User wants to see upcoming events.
- User wants to see who is attending an upcoming event.
- User wants to know when they will be free.
Platform Compatibility
- Target Frameworks:
- iOS: Support on iOS for the API
- Android: Support on Android for the API
- UWP: Support on UWP for the API
Backward Compatibility
- UWP: Windows 10 (introduced v10.0.10240.0)
(https://docs.microsoft.com/en-us/uwp/api/windows.applicationmodel.appointments.appointment) - Android: android:minSdkVersion="14"
(https://developer.android.com/reference/android/provider/CalendarContract) - iOS: All versions until reminders are added, then iOS 6
(https://developer.apple.com/documentation/eventkit/ekeventstore)