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) newDestroyOne(endpoint, options)

Return a function for deleting an item
Parameters:
Name Type Description
endpoint Endpoint
options Object
Properties
Name Type Attributes Default Description
allowable Array.<String> <optional>
[]
apiVersion Number <optional>
2 API version used
camelcase Boolean <optional>
true
Source:

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

Return a function for retrieving one or more items
Parameters:
Name Type Attributes Description
endpoint Endpoint
options Object <optional>
Properties
Name Type Attributes Default Description
allowable Array.<String> <optional>
apiVersion Number <optional>
2 API version used
camelcase Boolean <optional>
true
method String <optional>
get
Source:
Returns:
Type
itemsGetRequest

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

Return a function for retrieving one item
Parameters:
Name Type Attributes Description
endpoint Endpoint
options Object <optional>
Properties
Name Type Attributes Default Description
allowable Array.<String> <optional>
[]
apiVersion Number <optional>
2 API version used
camelcase Boolean <optional>
true
method String <optional>
get
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
apiVersion Number <optional>
2 API version used
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