     lastModification: type: String
     caldavuri   : type: String
 
-require('cozy-ical').decorateEvent Event
+ical.decorateEvent Event
+
 
 Event.all = (params, callback) ->
     Event.request "all", params, callback
 
+
 Event.byCalendar = (calendarId, callback) ->
     Event.request 'byCalendar', key: calendarId, callback
+
+
+Event.getInRange = (options, callback) ->
+    Event.request 'byDate', options, callback
+
 
 Event.createOrUpdate = (data, callback) ->
     {id} = data

americano = require 'cozydb'
log = require('printit')
    prefix: 'event:model'


                    details: data.details
                , (err) ->
                    event.beforeUpdate = oldValue
                    callback err, event, changes
            else
                callback null, event, changes
        else
            changes.creation = true
            Event.create data, (err, event) ->
                callback err, event, changes

