DataSync

DataSync

A class with helper methods for read and write of Solid PODs.

Constructor

new DataSync()

The constructor initiates a DataSync instance.
Source:

Methods

createEmptyFileForUser(url:) → {Promise}

This method creates an empty file for the given url. It overwrites existing files.
Source:
Parameters:
Name Type Description
url: the url of the empty file
Returns:
Type:
Promise
: the promise from auth.fetch().

deleteFileForUser(url:) → {Promise}

This method deletes a file.
Source:
Parameters:
Name Type Description
url: the url of the file that needs to be deleted.
Returns:
Type:
Promise
: the promise from auth.fetch().

executeSPARQLUpdateForUser(url:, query:) → {Promise}

This method executes an SPARQL update on a file.
Source:
Parameters:
Name Type Description
url: the url of the file that needs to be updated.
query: the SPARQL update query that needs to be executed.
Returns:
Type:
Promise
: the promise from auth.fetch().

sendToOpponentsInbox(url:, data:) → {Promise}

This method sends a notification to an inbox.
Source:
Parameters:
Name Type Description
url: the url of the inbox.
data: the RDF data representing the notification.
Returns:
Type:
Promise
: the promise from auth.fetch().