examples/export.rb in collectionspace-client-0.1.4 vs examples/export.rb in collectionspace-client-0.1.5

- old
+ new

@@ -19,10 +19,10 @@ # CREATE CLIENT WITH DEFAULT (DEMO) CONFIGURATION -- BE NICE!!! client = CollectionSpace::Client.new client.config.throttle = 1 # GET ALL CATALOGING RECORDS AND DUMP THE XML IF UPDATED SINCE 3 DAYS AGO -client.all('collectionobjects') do |item| +client.all('collectionobjects').each do |item| updated = Date.parse item["updatedAt"] if updated > Date.parse(14.days.ago.to_s) collectionobject = client.get item["uri"] # TO EXPORT WRITE THE BODY TO FILE, HERE WE JUST PRINT IT ap collectionobject.body # OR .xml.to_s