节点调查猴子轮询

时间:2013-10-31 03:33:50

标签: node.js surveymonkey

我正在尝试对已经更改答案或获得新受访者的受访者进行民意调查,但此代码似乎无论如何都会提取所有数据。我收到了错误的数据密钥吗?轮询指南建议添加start_modified_date,但这不起作用。提前致谢

var SurveyMonkeyAPI = require('surveymonkey').SurveyMonkeyAPI;

try { 
    var api = new SurveyMonkeyAPI(config.surveymonkey.key, config.surveymonkey.access_token, config.surveymonkey.params);
} catch (error) {
    console.log(error.message);
}

var data = {
    survey_id: surveyId,
    fields: ["date_created", "date_modified", "status"],
    start_modified_date: lastLoadedDate.toISOString().replace(/T/, ' ').replace(/\..+/, '')
};

console.log("FETCHING ", surveyId, data);
this.api.getRespondentList(data, this.bind(function (error, data) {
    if (error)
        console.log(error.message);
    else
        console.log(JSON.stringify(data)); // Do something with your data!
});

1 个答案:

答案 0 :(得分:0)