Get user calendar using OutlookClient

后端 未结 2 701
失恋的感觉
失恋的感觉 2020-12-22 07:12

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/a

相关标签:
2条回答
  • 2020-12-22 07:34
            mClient.getMe()                
                    .getCalendarView()
                    .addParameter("startDateTime", startDate)
                    .addParameter("endDateTime", endDate)
                    .select("Subject,Start,End").
                    .read()
    

    See https://msdn.microsoft.com/office/office365/api/complex-types-for-mail-contacts-calendar#UseODataqueryparametersSelectspecificpropertiestobereturned

    0 讨论(0)
  • 2020-12-22 08:01

    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("meetingRoom@company.com")
                    .getCalendarView()
                    .addParameter("startDateTime", startDate)
                    .addParameter("endDateTime", endDate)
                    .read()
    
    0 讨论(0)
提交回复
热议问题