lib/rews/folder.rb
# find <tt>Item::Item</tt>s in a folder
find Item::Items in a folder
find Item :: Items in a folder
def find_item(opts={})
        opts = check_opts(FIND_ITEM_OPTS, opts)
        r = with_error_check(client, :find_item_response, :response_messages, :find_item_response_message) do
          client.savon_client.request(:wsdl, "FindItem", "Traversal"=>"Shallow") do
            http.headers["SOAPAction"] = "\"#{SCHEMA_MESSAGES}/FindItem\"" 
            soap.namespaces["xmlns:t"]=SCHEMA_TYPES
            xml = Builder::XmlMarkup.new
            xml << Shape::ItemShape.new(opts[:item_shape]||{}).to_xml
            xml << View::IndexedPageItemView.new(opts[:indexed_page_item_view]).to_xml if opts[:indexed_page_item_view]
            xml << Restriction.new(opts[:restriction]).to_xml if opts[:restriction]
            xml << SortOrder.new(opts[:sort_order]).to_xml if opts[:sort_order]
            xml.wsdl :ParentFolderIds do
              xml << self.to_xml
            end
            soap.body = xml.target!
          end
        end
        FindResult.new(r.to_hash.fetch_in(:root_folder)) do |view|
          results = Item.read_items(client, view[:items])
        end
      end
def find_item ( opts = { } ) opts = check_opts ( FIND_ITEM_OPTS , opts ) r = with_error_check ( client , :find_item_response , :response_messages , :find_item_response_message ) do client . savon_client . request ( :wsdl , "FindItem" , "Traversal" => "Shallow" ) do http . headers [ "SOAPAction" ] = "\"#{SCHEMA_MESSAGES}/FindItem\"" soap . namespaces [ "xmlns:t" ] = SCHEMA_TYPES xml = Builder :: XmlMarkup . new xml << Shape :: ItemShape . new ( opts [ :item_shape ] || { } ) . to_xml xml << View :: IndexedPageItemView . new ( opts [ :indexed_page_item_view ] ) . to_xml if opts [ :indexed_page_item_view ] xml << Restriction . new ( opts [ :restriction ] ) . to_xml if opts [ :restriction ] xml << SortOrder . new ( opts [ :sort_order ] ) . to_xml if opts [ :sort_order ] xml . wsdl :ParentFolderIds do xml << self . to_xml end soap . body = xml . target! end end FindResult . new ( r . to_hash . fetch_in ( :root_folder ) ) do | view | results = Item . read_items ( client , view [ :items ] ) end end
find <tt>Item::Item</tt>s in a folder
find <tt > Item :: Item< / tt > s in a folder
# required by EWS 2007
opts
<not_specific>