Instance of the middleware to be used by the application
Dictionary containing each configured models settings.
Public getter to retrieve the middleware instance usable by application
Binds the instance router with each route verbs.
Number of entities that this router will bind.
Path to the API endpoint
Name of the model that is targetted.
Generates the API map of the specified endpoint. This is usually used with the options
verb.
Model api configuration to answer to
The action number to get map for.
Base URL of the endpoint (usually taken from the express request).
Object containing the API map.
Gets the handler to use with the provided query configuration. This is used at initialization for short binding.
Description of the API to bind
Numbering of the API.
Action done by the handlers to get.
HTTP verb that matches the handlers to get.
Respond to the request with a map of the API.
express request to answer to with API map.
express response which we are responding to.
Returns the answered response.
Parse the query and triggers the Diaspora call. This is the main middleware function of this server
Indicates the type of the query, saying if we are targetting a single or several entitie(s)
The Hook function to add to the router.
Retrieves data handled by Diaspora and add them to the request.
Request to parse.
Diaspora API description targeted by the request.
The express request transformed.
Generic delete
handler that can be called by middlewares.
Generic find
handler that can be called by middlewares.
Gets the loggable version of the request.
Request descriptor to log.
Object containing a description of the Diaspora request.
Generic insert
handler that can be called by middlewares.
Parse a query string to separate options from search clause.
Query string to parse
A hash with options & search clause separated
Generic update
handler that can be called by middlewares. it has the particularity of fully replacing entities attributes, keeping only IDs.
Respond to the request with an error code
Parsed request to answer to
express response object related to the request
Error to return to the client.
Status code to answer with. If not provided, it is guessed depending on the error.
Responds to the request with either an empty array or the set
The express response to respond to.
The set to send to the client.
The HTTP status code to send.
Responds to the request with either undefined or the entity
The express response to respond to.
The entity to send to the client.
The HTTP status code to send.
Adds the ID of the entity to the JSON to send to the client. This property is usually not stored in the entity's attributes hash, so we manually add it here.
Entity to cast to JSON with ID
The entity attributes, with the ID defined.
Generic update
handler that can be called by middlewares.
Hash of espress middlewares to bind to router.
Generated using TypeDoc
Generates a new RESTful API using express. This API responds to all verbs declared in HttpVerb.
Gerkin