Simple Builder
This class allow set simple values.
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| ogapi | InternalOpenGateAPI |
❌ | this is ogapi instance |
| resource | string |
❌ | this is the resource url where can be create/delete/update/read the entity |
| allowedDatastreams | array |
✅ | Allowed datastreams to add into the new entity |
| definedSchemas | array |
✅ | Jsonschema about all OpenGate specific types |
| jsonSchemaValidator | Validator |
✅ | Json schema validator tool |
deleteAll()
This invoke a request to OpenGate North API and the callback is managed by promises This function deletes a entity of provision
Retorna
Tip
Tipo: Promise
getAllowedDatastreams()
Retorna
Tip
Tipo: array
Allowed Datastream definition array
getEntityKey()
Retorna
Tip
Tipo: string
Entity identifier
patch()
This invoke a request to OpenGate North API and the callback is managed by promises This function patch a entity of provision
Retorna
Tip
Tipo: Promise
Ejemplos
update()
This invoke a request to OpenGate North API and the callback is managed by promises This function updates a entity of provision
Retorna
Tip
Tipo: Promise
Ejemplos
with(_id, val)
Set new datastream value
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| _id | string |
❌ | Datastream identifier |
| val | objecr |
❌ | Datastream value. If this value is null then datastream value will be removed. |
Retorna
Tip
Tipo: *