Method: Viewpoint::EWS::GenericFolder#sync_items_since!

Defined in:
lib/model/generic_folder.rb

#sync_items_since!(datetime, opts = {}) ⇒ Array<Item>

This is basically a work-around for Microsoft’s BPOS hosted Exchange, which does not support subscriptions at the time of this writing. This is the best way I could think of to get items from a specific period of time and track changes. !! Before using this method I would suggest trying a GenericFolder#items_since then using a subscription to track changes. This method should be followed by subsequent calls to GenericFolder#sync_items! to fetch additional items. Calling this method again will clear the sync_state and synchronize everything again.

Returns:

  • (Array<Item>)

    returns an array of Items



413
414
415
416
417
418
419
420
421
# File 'lib/model/generic_folder.rb', line 413

def sync_items_since!(datetime, opts={})
  clear_sync_state!

  begin
    items = sync_items!
  end until items.empty?

  items_since(datetime, opts)
end