ListChanges Method
Lists changes to the drive.
Syntax
onedrive.listChanges([callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This method may be used to list changes to the drive. This may be used to check for changes when maintaining a local copy of the drive.
After calling this method the current page of changes will be returned. Changes are represented as normal resources and the following properties are populated:
- ResourceCount
- ResourceCRC32Hash
- ResourceCreatedDate
- ResourceData
- ResourceDeleted
- ResourceDescription
- ResourceDownloadURL
- ResourceETag
- ResourceId
- ResourceIndex
- ResourceMarker
- ResourceMIMEType
- ResourceModifiedDate
- ResourceName
- ResourceParentId
- ResourceParentPath
- ResourcePath
- ResourceSHA1Hash
- ResourceSize
- ResourceType
- ResourceWebURL
Continue calling this method to list additional changes until ResourceCount is 0, indicating there are no more changes.
ResourceMarker will be populated with a value that can be used to request changes from this state onward. Save the ResourceMarker value for future use. The next time changes are listed set ResourceMarker to the saved value to request changes from that time forward. This allows only new changes to be listed, instead of listing all changes.