Class: UserSchema documentation

models~UserSchema()

new UserSchema()

A tipical coin_board user

Properties:
Name Type Description
email String

the user email

username String

the user username

usercurrency String

the user default fiat or crypto currency

ethaddr String

WIP around decentralisation and smart contracts

telegramid String

user telegram id for bot access when registered

password String

user password

Apis Array

see module:models~ApiSchema

Assets Array

see module:models~AssetsSchema

Date Object

the user creation timestamp

Source:

Methods

(static) UserSchema.statics.addapi(id, apitype, apiid, apikey, apisecret, callback)

Add a new Api object a User

Parameters:
Name Type Description
id String

the User id from session

apitype String

from enum ['Bank', 'Crypto', 'Markets']

apiid String

the name of the new api service

apikey String

the new api service key

apisecret String

the new api service secret

callback function

to get the result data or error

Source:

(static) UserSchema.statics.addasset(id, assettype, assetid, assetticker, assetqtt, callback)

Add a new Asset object to a User

Parameters:
Name Type Description
id String

the User id from session

assettype String

from enum ['Bank', 'Crypto', 'Markets']

assetid String

the name of the new Asset

assetticker String

the ticker / symbol

assetqtt String

the qtt to parsed in float

callback function

to get the result data or error

Source:

(static) UserSchema.statics.authenticate(username, password, callback)

Main authentication method for a User

Parameters:
Name Type Description
username String

the user unique username

password String

the user password

callback function

to get the user data or error

Source: