login

Apperyio.User.login(options, [dbId])

Receives Appery.io Database token. Returns s Promise.

#Parameters This function has the following parameters:

Arguments Description
options Request parameters. Should contain username and password fields.
dbId Database id. Optional if default database id is set.

Example

Receiving Appery.io Database token.

Apperyio.User.login({"username": "test", "password": "test"}).then(function(result){
  alert("success_" + JSON.stringify(result));
}, function(error) {
  alert("error_" + JSON.stringify(error));
});