Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

OpenFn/language-kobotoolbox

Repository files navigation

⚠️ MOVED TO OpenFn/adaptors! ⚠️

N.B.: New versions are available at: https://github.com/OpenFn/adaptors/tree/main/packages/kobotoolbox

Language Kobotoolbox (Archived)

Language Pack for building expressions and operations to interact with the Kobotoolbox API.

Documentation

post

sample configuration

{
  "baseURL": "https://kf.kobotoolbox.org",
  "username": "mamadou@openfn.org",
  "password": "supersecret",
  "apiVersion": "v2"
}

Get the list of forms

getForms({}, state => {
  console.log(state.data);
  return state;
});

Get submissions for a specific form

A query can be used to filter results.

getSubmissions(
  { formId: 'aXecHjmbATuF6iGFmvBLBX', query: { end: { $gte: '2020-11-20' } } },
  state => {
    console.log(state.data);
    return state;
  }
);

Development

Clone the repo, run npm install.

Run tests using npm run test or npm run test:watch

Build the project using make.