Reputation: 6347
I'm using Outlook-SDK-Android (https://github.com/OfficeDev/Outlook-SDK-Android) to talk with Outlook Calendar REST API (https://msdn.microsoft.com/en-us/office/office365/api/calendar-rest-operations).
So far I've been able to get the events on my own calendar using:
import com.microsoft.services.outlook.fetchers.OutlookClient;
OutlookClient mClient;
...
mClient = new OutlookClient(outlookBaseUrl, mResolver);
...
mClient.getMe()
.getCalendarView()
.addParameter("startDateTime", startDate)
.addParameter("endDateTime", endDate)
.read()
This corresponds to "https://outlook.office.com/api/v2.0/me/calendarView?startDateTime={start_datetime}&endDateTime={end_datetime}"
(or also "..v2.0/USERS/[email protected]/CALENDARVIEW)
Upvotes: 0
Views: 1657
Reputation: 151
mClient.getMe()
.getCalendarView()
.addParameter("startDateTime", startDate)
.addParameter("endDateTime", endDate)
.select("Subject,Start,End").
.read()
Upvotes: 0
Reputation: 11086
There is a select
method:
public OrcCollectionFetcher<TEntity, TFetcher, TOperations> select(String select)
in OrcCollectionFetcher
class, so you can call it like this:
mClient.getMe()
.getCalendarView()
.addParameter("startDateTime", startDate)
.addParameter("endDateTime", endDate)
.select("Subject")
.read()
To get events from resource try this:
final List<Event> events = outlookClient
.getUsers()
.getById("[email protected]")
.getCalendarView()
.addParameter("startDateTime", startDate)
.addParameter("endDateTime", endDate)
.read()
Upvotes: 1