Passer au contenu principal

magpi@1.0.3

Functions

execute(operations)Operation

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

fetchSurveyData(params)Operation

Make a POST request to fetch Magpi data and POST it somewhere else

submitRecord(jsonData)Operation

Submit a record for a form/survey which already exists in a Magpi user account

execute(operations) ⇒ Operation

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

Kind: global function

ParamTypeDescription
operationsOperationsOperations to be performed.

Example

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

fetchSurveyData(params) ⇒ Operation

Make a POST request to fetch Magpi data and POST it somewhere else

Kind: global function
Access: public

ParamTypeDescription
paramsobjectdata to make the fetch

Example

fetchSurveyData({
"surveyId": "37479",
"afterDate": "2017-09-27",
"postUrl": "https://www.openfn.org/inbox/your-inbox-url"
})

submitRecord(jsonData) ⇒ Operation

Submit a record for a form/survey which already exists in a Magpi user account

Kind: global function
Access: public

ParamTypeDescription
jsonDataobjectPayload data for the record

Example

submitRecord(jsonData)