我使用Outlook-SDK-Android(https://github.com/OfficeDev/Outlook-SDK-Android)与Outlook Calendar REST API(https://msdn.microsoft.com/en-us/office/office365/api/calendar-rest-operations)交谈。
到目前为止,我已经能够使用以下方式在我自己的日历上获取活动:
import com.microsoft.services.outlook.fetchers.OutlookClient;
OutlookClient mClient;
...
mClient = new OutlookClient(outlookBaseUrl, mResolver);
...
mClient.getMe()
.getCalendarView()
.addParameter("startDateTime", startDate)
.addParameter("endDateTime", endDate)
.read()
这对应于" https://outlook.office.com/api/v2.0/me/calendarView?startDateTime={start_datetime}&endDateTime={end_datetime}"
(或者" ..v2.0/USERS/meetingRoom@etc.com/CALENDARVIEW)
答案 0 :(得分:1)
有select
方法:
public OrcCollectionFetcher<TEntity, TFetcher, TOperations> select(String select)
OrcCollectionFetcher
类中的,所以你可以像这样调用它:
mClient.getMe()
.getCalendarView()
.addParameter("startDateTime", startDate)
.addParameter("endDateTime", endDate)
.select("Subject")
.read()
要从资源中获取事件,请尝试以下操作:
final List<Event> events = outlookClient
.getUsers()
.getById("meetingRoom@company.com")
.getCalendarView()
.addParameter("startDateTime", startDate)
.addParameter("endDateTime", endDate)
.read()
答案 1 :(得分:0)
mClient.getMe()
.getCalendarView()
.addParameter("startDateTime", startDate)
.addParameter("endDateTime", endDate)
.select("Subject,Start,End").
.read()