Android 使用Outlook客户端和Outlook日历API发布和删除预订

Android 使用Outlook客户端和Outlook日历API发布和删除预订,android,ms-office,android-sdk-2.3,outlook-restapi,outlook-calendar,Android,Ms Office,Android Sdk 2.3,Outlook Restapi,Outlook Calendar,我用()来跟你说话 到目前为止,我已经能够通过以下方式从日历中获取活动: import com.microsoft.services.outlook.fetchers.OutlookClient; OutlookClient mClient; ... mClient = new OutlookClient(outlookBaseUrl, mResolver); final List<Event> ev

我用()来跟你说话

到目前为止,我已经能够通过以下方式从日历中获取活动:

        import com.microsoft.services.outlook.fetchers.OutlookClient;

        OutlookClient mClient;
        ...
        mClient = new OutlookClient(outlookBaseUrl, mResolver);

        final List<Event> events = mClient
            .getMe()
            //.getUsers()
            //.getById("meetingRoom@company.com") // This gives me back 403 :(
            .getCalendarView()
            .addParameter("startDateTime", startDate)
            .addParameter("endDateTime", endDate)
            .read()
import com.microsoft.services.outlook.fetchers.OutlookClient;
展望客户mClient;
...
mClient=新的OutlookClient(outlookBaseUrl,mResolver);
最终列表事件=mClient
.getMe()
//.getUsers()
//.getById(“meetingRoom@company.com“”//这给了我403:(
.getCalendarView()
.addParameter(“startDateTime”,startDate)
.addParameter(“endDateTime”,endDate)
.读()
(见附件)

现在的问题是:

  • 如何使用OutlookClient添加预订
发布-from)

  • 改为删除日历事件怎么样
从中删除)


感谢

感谢Outlook SDK Android作者之一(Marcos Torres-Microsoft委内瑞拉)的提示,它只是:

创建事件​:

Event addedEvent = client.getMe()
                         .getCalendars().getById("Calendar").getEvents().add(event).get();
client.getMe().getEvents().getById(addedEvent.getId()).delete().get();
删除事件​:

Event addedEvent = client.getMe()
                         .getCalendars().getById("Calendar").getEvents().add(event).get();
client.getMe().getEvents().getById(addedEvent.getId()).delete().get();

值得记住的是,“我们不再维护SDK了。顺便说一句,4月初(构建会议)将发布一个新的SDK。虽然现在可能无法覆盖所有Outlook API表面,但它将在未来发布。”

同时“请记住,SDK是由端点元数据生成的代码。如果元数据(因此服务)发生变化,SDK将无法工作。”