Base Search
This is an abstract class that must be extended by another class defining the specific search. This class is responsible for managing and executing requests to the OpenGate North API.
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| ogapi | InternalOpenGateAPI |
❌ | this is ogapi instance |
| resource | string |
❌ | this is a base url resource |
| timeout | number |
✅ | timeout on request |
| serviceBaseURL | string |
❌ | base of the uri petition |
downloadCsv()
Not implemented yet. This invoke a request to OpenGate North API and the callback is managed by promises This invoke a request to OpenGate North API and the callback is managed by promises
Retorna
Tip
Tipo: Promise
execute()
This invokes a request to the OpenGate North API; the response is handled via promises.
Retorna
Tip
Tipo: Promise
executeWithAsyncPaging(resource)
This invokes a request for asynchronous paging to the OpenGate North API; each page is returned via promises and a notify callback. To cancel the process, return `false` or a string with a custom message from the notify callback. When the process is canceled, the response will be 403: Forbidden -> {data: 'Cancel process'|| custom_message, statusCode: 403}
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| resource | string |
❌ | resource to find. |
Retorna
Tip
Tipo: Promise