getChanges method

Future<CalResponse> getChanges(
  1. String path, {
  2. int? depth,
})

Request the ctag again on the calendar. If the ctag did not change, you still have the latest copy. If it did change, you must request all the etags in the entire calendar again.

Implementation

Future<CalResponse> getChanges(String path, {int? depth}) {
  var body = '''
  <c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav">
    <d:prop>
      <d:getetag />
    </d:prop>
    <c:filter>
      <c:comp-filter name="VCALENDAR" />
    </c:filter>
  </c:calendar-query>
  ''';

  return report(path, body, depth: depth);
}