Class: Calendav::Requests::ListTodos

Inherits:
Object
  • Object
show all
Defined in:
lib/calendav/requests/list_todos.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.callObject



10
11
12
# File 'lib/calendav/requests/list_todos.rb', line 10

def self.call(...)
  new.call
end

Instance Method Details

#callObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/calendav/requests/list_todos.rb', line 14

def call
  Nokogiri::XML::Builder.new do |xml|
    xml["caldav"].public_send("calendar-query", NAMESPACES) do
      xml["dav"].prop do
        xml["dav"].getetag
        xml["caldav"].public_send(:"calendar-data")
      end
      xml["caldav"].filter do
        xml["caldav"].public_send(:"comp-filter", name: "VCALENDAR") do
          xml["caldav"].public_send(:"comp-filter", name: "VTODO")
        end
      end
    end
  end
end