1.7.10 • Published 8 years ago
lorant_api v1.7.10
LorantMMS NodeJS API
DB Usage
var sqldb = require('lorant_api').sqldb;
var config = {
database: 'database name',
username: 'username',
password: 'password',
options: { /* options object */ }
};
sqldb.init(config)
.then(function (db) {
// db will contain all the models from the DB
});
// After initialization
sqldb.queryData(/* query string */)
.then(function (data) {
// will contain all the DB data
});
sqldb.update(type, props);
sqldb.updateFileName(type, id, file);
sqldb.queryCMS(supercat, cat, subcat, subsubcat, thirdcat)
.then(function (data) {
// will contain the required data or the list of supercategories
});Email Usage
var mail = require('lorant_api').email;
// Not needed unless you need to override defaults
mail.config({
user, // Mail User
password, // Mail Password
host, // Mail Host
site, // Site name
port, // Port
email, // Sender email
to, // Receiver email
subject // Email Subject
});
// Can be called instantly after requiring
// No need to setup with config if defaults wanted
mail.send({
name, // Sender name
email, // Sender email
message, // Sender message
});1.7.10
8 years ago
1.7.9
8 years ago
1.7.8
8 years ago
1.7.7
8 years ago
1.7.6
8 years ago
1.8.0
9 years ago
1.7.5
9 years ago
1.7.4
9 years ago
1.7.3
9 years ago
1.7.2
9 years ago
1.7.1
9 years ago
1.7.0
9 years ago
1.6.1
9 years ago
1.6.0
9 years ago
1.5.0
9 years ago
1.4.0
9 years ago
1.3.0
9 years ago
1.2.2
9 years ago
1.2.1
9 years ago
1.2.0
9 years ago
1.0.1
9 years ago
1.0.0
9 years ago