node-limesurvey
A limesurvey node.js client (with promise)
Usage
<!> Do not forget to activate the LimeSurvey API first! To do this, access your global configuration, click on Interfaces and enable the API setting (JSON-RPC). <!>
More info : https://manual.limesurvey.org/RemoteControl_2_API
Code example
var fs =var limesurvey =url: 'https://xxxxxxxx/index.php/admin/remotecontrol'username: 'xxxxx'password: 'xxxxx'var start = async// NOT MANDATORY - LIB AUTO (RE)GENERATE TOKEN IF NEEDED// let token = await limesurvey.getToken()// console.log('token', token)let surveys = await limesurveyconsolelet survey = await limesurveyconsolelet questions = await limesurveyconsolelet groups = await limesurveyconsolelet responses1 = await limesurveyconsolelet responses2 = await limesurveyconsolelet prettyResponses = await limesurveyconsolelet content = await limesurvey// fs.writeFile('/docs/stat.xls', content)
Debug
This lib use https://www.npmjs.com/package/debug
DEBUG=* node example.js DEBUG=limesurvey node example.js