const packageJSON = require('../package.json'); const config = require('../config.json'); function get() { let html = '' + '' + '' + packageJSON.name + ' ' + packageJSON.version + '' + '' + '' + '' + '
' + '

' + packageJSON.name + ' ' + packageJSON.version + '

' + '
' + '
'; html += '
' + '

get:

' + '

' + config.api.get.description + '

' + '

endpoints: '; for (let index = 0; index < config.api.get.endpoints.length; index++) { if (index > 0) { html += ', '; } html += config.api.get.endpoints[index]; } html += '

' + '
' + '

post:

' + '

endpoints: '; for (let index = 0; index < config.api.post.endpoints.length; index++) { if (index > 0) { html += ', '; } html += config.api.post.endpoints[index]; } html += '

' + '' + '' + '' + '' + '' + ''; Object.keys(config.api.post).forEach((argument) => { if (argument === 'endpoints') { return; } let restrictions = config.api.post[argument].restrictions || ''; html += '' + '' + '' + '' + '' + '' + ''; }); html += '
argumentavailable valuesdefaultrestrictionsdescription
' + argument + '' + config.api.post[argument].available + '' + config.api.post[argument].default + '' + restrictions + '' + config.api.post[argument].description + '
' + '
' + '' + ''; return html; } module.exports = { get };