Module: generate

Generate endpoints and SSE clients
Source:

Methods

(inner) newCustomPostOne(endpoint, initParams, allowableopt) → {itemsPostOneRequest}

Return a function for custom Post requests
Parameters:
Name Type Attributes Description
endpoint Endpoint
initParams Object parameters used to indicate we are infact modifying
allowable Array.<String> <optional>
Source:
Returns:
Type
itemsPostOneRequest

(inner) newGet(endpoint, allowableopt) → {itemsGetRequest}

Return a function for retrieving one or more items
Parameters:
Name Type Attributes Description
endpoint Endpoint
allowable Array.<String> <optional>
Source:
Returns:
Type
itemsGetRequest

(inner) newGetOne(endpoint, allowableopt) → {itemsGetOneRequest}

Return a function for retrieving one item
Parameters:
Name Type Attributes Description
endpoint Endpoint
allowable Array.<String> <optional>
Source:
Returns:
Type
itemsGetOneRequest

(inner) newPostOne(endpoint, optionsopt) → {itemsPostOneRequest}

Return a function for posting items
Parameters:
Name Type Attributes Description
endpoint Endpoint
options Object <optional>
Properties
Name Type Attributes Default Description
allowable Array.<String> <optional>
method String <optional>
post
Source:
Returns:
Type
itemsPostOneRequest

(inner) newPutOne(endpoint, optionsopt) → {itemsPutOneRequest}

Return a function for editing an item
Parameters:
Name Type Attributes Description
endpoint String
options Object <optional>
Passed to module:generate~newPostOne
Source:
Returns:
Type
itemsPutOneRequest

(inner) newSSEClientFactory(endpoint) → {SSEClientFactory}

Return a function that returns a SSE client
Parameters:
Name Type Description
endpoint Endpoint
Source:
Throws:
Error
Returns:
Type
SSEClientFactory