MS Graph SDK:向 CalendarView 添加参数
MS Graph SDK: Adding Parameters to CalendarView
我在 Graph Rest API 中有以下声明 returns 给定日期时间内来自某个日历的所有事件:
https://graph.microsoft.com/beta/me/calendars/ID/calendarView?startDateTime=2017-02-01T10:31:37Z&endDateTime=2017-02-10T10:31:37Z
如何使用 SDK 执行此操作?到目前为止我得到了什么:
ICalendarEventsCollectionPage retrievedEvent = await graphClient.Me.Calendars[id].CalendarView...
您可以将这些作为查询选项添加到请求中。
QueryOption startDateTime = new QueryOption("startDateTime", "2017-02-01T10:31:37Z");
QueryOption endDateTime = new QueryOption("endDateTime", "2017-02-10T10:31:37Z");
List options = new List();
options.Add(startDateTime);
options.Add(endDateTime);
ICalendarCalendarViewCollectionPage retrievedEvents = await graphClient
.Me
.Calendars["id"]
.CalendarView
.Request(options)
.GetAsync();
我在 Graph Rest API 中有以下声明 returns 给定日期时间内来自某个日历的所有事件:
https://graph.microsoft.com/beta/me/calendars/ID/calendarView?startDateTime=2017-02-01T10:31:37Z&endDateTime=2017-02-10T10:31:37Z
如何使用 SDK 执行此操作?到目前为止我得到了什么:
ICalendarEventsCollectionPage retrievedEvent = await graphClient.Me.Calendars[id].CalendarView...
您可以将这些作为查询选项添加到请求中。
QueryOption startDateTime = new QueryOption("startDateTime", "2017-02-01T10:31:37Z");
QueryOption endDateTime = new QueryOption("endDateTime", "2017-02-10T10:31:37Z");
List options = new List();
options.Add(startDateTime);
options.Add(endDateTime);
ICalendarCalendarViewCollectionPage retrievedEvents = await graphClient
.Me
.Calendars["id"]
.CalendarView
.Request(options)
.GetAsync();