Skip to main content

medicmobile@0.5.7

changesApi(params, callback)
fetchSubmissions(formId, params, postUrl)
pickFormData(formId)

This adaptor exports the following from common:

alterState()
dataPath()
dataValue()
each()
field()
fields()
fn()
fnIf()
lastReferenceValue()
merge()
sourceValue()

Functions

changesApi

changesApi(params, callback) ⇒ Operation

Access the CouchDB Changes API

ParamTypeDescription
paramsobjectQuery parameters
callbackfunction(Optional) Callback function

Example

changesApi(params, callback)

fetchSubmissions

fetchSubmissions(formId, params, postUrl) ⇒ Operation

Access form submissions and post them as JSON.

ParamTypeDescription
formIdstringQuery parameters
paramsobjectStarting sequence id
postUrlstringInbox to post form data

Example

fetchSubmissions(
"pregnancy", // formId
{ "last-event-id": 334 }, // params
"http://localhost:4000/inbox/abc-123-xyz" // postUrl
);

pickFormData

pickFormData(formId) ⇒ Operation

Select submissions for a specific form

ParamTypeDescription
formIdstringThe form ID.

Example

pickFormData(formId)