magpi@1.2.2
This adaptor exports the following from common:
- alterState()
- dataPath()
- dataValue()
- each()
- field()
- fields()
- fn()
- fnIf()
- lastReferenceValue()
- merge()
- sourceValue()
Functions
fetchSurveyData
fetchSurveyData(params) ⇒ Operation
Make a POST request to fetch Magpi data and POST it somewhere else
Param | Type | Description |
---|---|---|
params | object | data to make the fetch |
Example
fetchSurveyData({
"surveyId": "37479",
"afterDate": "2017-09-27",
"postUrl": "https://www.openfn.org/inbox/your-inbox-url"
})
submitRecord
submitRecord(jsonData) ⇒ Operation
Submit a record for a form/survey which already exists in a Magpi user account
Param | Type | Description |
---|---|---|
jsonData | object | Payload data for the record |
Example
submitRecord(jsonData)