EntityController
Summary
Provides route actions for all requests relative to entities.
Constructor
EntityController
Syntax
EntityController
(
-
Entity
Summary
Parameters:
-
EntityFunctionAn entity function extending EntityModel
Item Index
Methods
addEntityAction
Syntax
addEntityAction
()
Summary
Adds an entity.
Also expects entity data in body.
Example:
{
"entity" : { ... }
}
getEntitiesAction
Syntax
getEntitiesAction
()
Summary
Gets a list of entities.
Example:
{
"entities" : [ ... ]
}
getEntityAction
Syntax
getEntityAction
()
Summary
Gets a specific entity.
Expects the following url parameters :
- id The id of the entity to retrieve
Example:
{
"entity" : { ... }
}
removeEntityAction
Syntax
removeEntityAction
()
Summary
Removes an entity.
Expects the following url parameters :
- id The id of the entity to remove
updateEntityAction
Syntax
updateEntityAction
()
Summary
Updates an entity.
Expects the following url parameters :
- id The id of the entity to update
Also expects data in body.