Skip to main content

kobotoolbox@1.2.0

Adaptor

Adaptor.execute(operations) ⇒ Operation

Execute a sequence of operations. Wraps language-common/execute, and prepends initial state for http.

Kind: static method of Adaptor

ParamTypeDescription
operationsOperationsOperations to be performed.

Example

execute(
create('foo'),
delete('bar')
)(state)

Adaptor.getForms(params, callback) ⇒ Operation

Make a request to get the list of forms

Kind: static method of Adaptor
Access: public

ParamTypeDescription
paramsobjectQuery, Headers and Authentication parameters
callbackfunction(Optional) Callback function to execute after fetching form list

Example

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

Adaptor.getSubmissions(params, callback) ⇒ Operation

Get submissions for a specific form

Kind: static method of Adaptor

ParamTypeDescription
paramsobjectForm Id and data to make the fetch or filter
callbackfunction(Optional) Callback function to execute after fetching form submissions

Example

getSubmissions({formId: 'aXecHjmbATuF6iGFmvBLBX'}, state => {
console.log(state.data);
return state;
});