0.0.3 • Published 8 years ago
dashboards-nodejs-client-api v0.0.3
_m0ck_cl13nt_ap1
npm install
var client = require('_m0ck_cl13nt_ap1');
All callbacks has the same arguement error, body, & statusCode
Login
client.auth.postLogin(requestBody, function(error, body, statusCode) {
// do logic here
if(err) {
// Unauthorized
} else {
// Authrorized
}
});
Users
Get all
client.users.getUsers(function(error, body, statusCode) {
if(error) {
// No Record Found
} else {
// display Users
}
});
Get one
client.users.getUserById({userId}, function(error, body, statusCode) {
if(error) {
// No Record Found
} else {
/// Display User
}
});