Module: persistence

Used to handle data persistence.
Source:

Methods

(inner) addAccount(credentials, user, callback)

Adds a new user account.
Parameters:
Name Type Description
credentials Object the credentials object passed by the API
user Object the additional user details (name)
callback function run on completion
Source:

(inner) addBookToCart(credentials, bookDetails, callback)

Adds a book to the user's shopping cart.
Parameters:
Name Type Description
credentials Object the credentials object passed by the API
bookDetails Object the details of the book to add
callback function run on completion
Source:

(inner) addBookToCart(credentials, callback)

gets the contents of the user's shopping cart.
Parameters:
Name Type Description
credentials Object the credentials object passed by the API
callback function run on completion
Source:

(inner) search(credentials, callback)

Checks to see if the supplied credentials are valid.
Parameters:
Name Type Description
credentials Object the credentials object passed by the API
callback function run on completion
Source:

(inner) validUsername(credentials, callback)

Checks to see if the supplied credentials are valid.
Parameters:
Name Type Description
credentials Object the credentials object passed by the API
callback function run on completion
Source: