Skip to main content

template@1.7.4

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.create(path, params, callback) ⇒ Operation

Creates a fictional resource in a fictional destination system using a POST request

Kind: static method of Adaptor
Access: public

ParamTypeDescription
pathstringPath to resource
paramsobjectdata to create the new resource
callbackfunction(Optional) callback function

Example

create("/endpoint", {"foo": "bar"})

Adaptor.createPatient(params, callback) ⇒ Operation

Create a fictional patient in a fictional universe with a fictional REST api

Kind: static method of Adaptor
Access: public

ParamTypeDescription
paramsobjectdata to create the new resource
callbackfunction(Optional) callback function

Example

createPatient({"foo": "bar"})