class Calendav::Requests::SyncCollection

Attributes

token[R]

Public Class Methods

call(...) click to toggle source
# File lib/calendav/requests/sync_collection.rb, line 10
def self.call(...)
  new(...).call
end
new(token) click to toggle source
# File lib/calendav/requests/sync_collection.rb, line 14
def initialize(token)
  @token = token
end

Public Instance Methods

call() click to toggle source
# File lib/calendav/requests/sync_collection.rb, line 18
def call
  Nokogiri::XML::Builder.new do |xml|
    xml["dav"].public_send(:"sync-collection", NAMESPACES) do
      xml["dav"].public_send(:"sync-token", token)
      xml["dav"].public_send(:"sync-level", 1)
      xml["dav"].prop do
        xml["dav"].getetag
        xml["caldav"].public_send(:"calendar-data")
      end
    end
  end
end