且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

与Android谷歌日历API - 删除事件

更新时间:2023-12-03 14:33:52

添加到了EventEntry.java:

Added this to EventEntry.java:

@Key("@gd:etag")
public String etag;

添加到了CalendarClient.java:

Added this to CalendarClient.java:

   public void executeDelete(Entry entry) throws IOException {
        HttpRequest request = requestFactory.buildDeleteRequest(new GenericUrl(entry.getEditLink()));
        if (entry instanceof EventEntry) {
            request.headers.ifMatch = ((EventEntry) entry).etag;
        }
        request.execute().ignore();
    }