Class: Author

classes~Author(id, name, personalName, createdAt, updatedAt)

Class representing an author.

Constructor

new Author(id, name, personalName, createdAt, updatedAt)

Create an author.
Parameters:
Name Type Description
id number
name string
personalName string
createdAt date
updatedAt date
Source:

Methods

(async) getBooks()

Get the books of the author.
Source:

(async) linkToBook(book) → {Promise:.<void:>}

Link the author to a book.
Parameters:
Name Type Description
book object
Source:
Returns:
Type
Promise:.<void:>

(async) refresh()

Refreshes data from the database that has been pulled at least once before in this instance.
Source: