API generation

This commit is contained in:
delvedor
2019-03-13 14:12:38 +01:00
parent 4663738cf4
commit 2ca3754d20
253 changed files with 2277 additions and 0 deletions

View File

@ -92,6 +92,15 @@ function buildSearchTemplate (opts) {
options = {}
}
// promises support
if (callback == null) {
return new Promise((resolve, reject) => {
searchTemplate(params, options, (err, body) => {
err ? reject(err) : resolve(body)
})
})
}
// check required parameters
if (params['body'] == null) {
return callback(