medicmobile@0.3.2
Functions
- execute(operations) ⇒
Operation
Execute a sequence of operations. Wraps
@openfn/language-common/execute
, and prepends initial state for http.- fetchSubmissions(formId, params, postUrl) ⇒
Operation
Access form submissions and post them as JSON.
- changesApi(params, callback) ⇒
Operation
Access the CouchDB Changes API
- pickFormData(formId) ⇒
Operation
Select submissions for a specific form
execute(operations) ⇒ Operation
Execute a sequence of operations.
Wraps @openfn/language-common/execute
, and prepends initial state for http.
Kind: global function
Param | Type | Description |
---|---|---|
operations | Operations | Operations to be performed. |
Example
execute(
create('foo'),
delete('bar')
)(state)
fetchSubmissions(formId, params, postUrl) ⇒ Operation
Access form submissions and post them as JSON.
Kind: global function
Access: public
Param | Type | Description |
---|---|---|
formId | string | Query parameters |
params | object | Starting sequence id |
postUrl | string | Inbox to post form data |
Example
fetchSubmissions(
"pregnancy", // formId
{ "last-event-id": 334 }, // params
"http://localhost:4000/inbox/abc-123-xyz" // postUrl
);
changesApi(params, callback) ⇒ Operation
Access the CouchDB Changes API
Kind: global function
Access: public
Param | Type | Description |
---|---|---|
params | object | Query parameters |
callback | function | (Optional) Callback function |
Example
changesApi(params, callback)
pickFormData(formId) ⇒ Operation
Select submissions for a specific form
Kind: global function
Access: public
Param | Type | Description |
---|---|---|
formId | string | The form ID. |
Example
pickFormData(formId)