GoogleDatabase(opts)

new GoogleDatabase(opts)

Constructs a database object
Parameters:
Name Type Description
opts Object Google sheets credentials

Members

glogin :Object

The google login credentials

gtables :Object

The google spreadsheets of this database, empty on instantiation.

Methods

async load() → {Promise}

Loads all sheets connected to this database
Returns:
Promise - resolves to this

loadGFunctions(lpathopt) → {Object}

Loads google sheet loaders
Parameters:
Name Type Attributes Default Description
lpath string <optional>
'./gLoaders' Path where google loaders are stored.
Returns:
Object - Database load functions.

async loadGSheet(gsheet) → {Promise}

Loads a google sheet
Parameters:
Name Type Description
gsheet GoogleSpreadsheet The sheet to load
Returns:
Promise - Resolves to this._sheets

async loadPrivateGS() → {Promise}

Loads internal google sheets database
Returns:
Promise - Resolves to this