Skip to content

Commit

Permalink
feat: add examples to kobotoolbox
Browse files Browse the repository at this point in the history
Signed-off-by: Hunter Achieng <[email protected]>
  • Loading branch information
hunterachieng committed Feb 6, 2025
1 parent c5841c0 commit 9a7c30a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions adaptors/library/jobs/kobotoolbox-create-asset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
http.post('/assets/', {
name: 'Feedback Survey Test',
asset_type: 'survey',
});
6 changes: 6 additions & 0 deletions adaptors/library/jobs/kobotoolbox-get-submissions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fn(state => {
state.formId = state.data.formId;
return state;
});

getSubmissions($.formId);
10 changes: 10 additions & 0 deletions adaptors/library/staticExamples.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,15 @@
"expressionPath": "jobs/async-findValue",
"adaptor": "postgresql",
"name": "Using findValue with an array of data"
},
{
"expressionPath": "jobs/kobotoolbox-create-asset",
"adaptor": "kobotoolbox",
"name": "Create an asset in KoboToolbox"
},
{
"expressionPath": "jobs/kobotoolbox-get-submissions",
"adaptor": "kobotoolbox",
"name": "Extract submissions from KoboToolbox"
}
]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@
"cytoscape": "3.28.1"
},
"packageManager": "[email protected]"
}
}

0 comments on commit 9a7c30a

Please sign in to comment.