0

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}」に対応します。

  • 読み取りアクセス許可を持っている他のユーザーの予定表に使用するには、Outlook のドキュメントで指定されている次の形式で同じことを行うにはどうすればよいですか?

" https://outlook.office.com/api/v2.0/USERS/meetingRoom@etc.com/calendars/Calendar/EVENTS?startDateTime={start_datetime}&endDateTime={end_datetime} "

(または " ..v2.0/USERS/meetingRoom@etc.com/CALENDARVIEW )

  • OutlookClient を使用して、クエリ パラメータ "$select" を後者に追加するにはどうすればよいですか? (例: $select=Subject,Organizer,Start,End)
4

2 に答える 2

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()
于 2016-03-08T18:35:23.460 に答える
0
        mClient.getMe()                
                .getCalendarView()
                .addParameter("startDateTime", startDate)
                .addParameter("endDateTime", endDate)
                .select("Subject,Start,End").
                .read()

https://msdn.microsoft.com/office/office365/api/complex-types-for-mail-contacts-calendar#UseODataqueryparameters特定のプロパティを選択して返されるを参照してください

于 2016-05-18T04:55:48.967 に答える