Developer README for the surveycto adaptor
Language Pack for building expressions and operations to make HTTP calls to SurveyCTO.
fetchSubmissions(1,2,3) takes three arguments:
formIdof the form on SurveyCTO
initialAfterDate, a date string or UNIX timestamp which instructs the job to only fetch submissions after a certain date. After the first run of the job, subsequent runs will only fetch NEW submissions.
postUrlis where the wide-format JSON representation of each form submission should be sent. Note that a
formIdkey will be added to each form submission for later filtering/routing.
// formId on SurveyCTO server
// initialAfterDate: this will only be accessed if "lastSubmissionDate" is empty in your job_state".
// After the initial run of the job, OpenFn will only pull new submissions from SurveyCTO.
'Aug 29, 2016 4:44:26 PM',
// postUrl is where you want to send the JSON submissions, appended with a new "formId" key
Clone the repo, run
Run tests using
npm run test or
npm run test:watch
Build the project using