Home Manual Reference Source Test Repository
public class | source

AssetSearch

Extends:

BaseSearchSearch → AssetSearch

This extends Search and allow make request to any available resource into Opengate North API.

Constructor Summary

Public Constructor
public

constructor(ogapi: InternalOpenGateAPI, url: string, filter: object, limit: object, sort: object, group: object)

Constructor

Method Summary

Public Methods
public

This invoke a request to OpenGate North API and the callback is managed by promises

Inherited Summary

From class BaseSearch
public

cancel: *

public

cancelAsyncPaging(message: *)

public

This invoke a request to OpenGate North API and the callback is managed by promises

public

This invoke a request to OpenGate North API and the callback is managed by promises

public

This invokes a request for asynchronous paging to the OpenGate North API and the return of the pages is managed by promises and its notify object To cancel the process in the notify method return false or string with custom message for response In case of canceling the process, the response will be 403: Forbidden -> {data: 'Cancel process'|| custom_message, statusCode: 403}

Public Constructors

public constructor(ogapi: InternalOpenGateAPI, url: string, filter: object, limit: object, sort: object, group: object) source

Constructor

Override:

Search#constructor

Params:

NameTypeAttributeDescription
ogapi InternalOpenGateAPI
  • nullable: false

this is configuration about Opengate North API.

url string
  • nullable: false

this define a specific resource to make the search

filter object

this is the filter

limit object

this is the pagination about the search

sort object

this defined parameters to order the result of search

group object

this defined the group by

Public Methods

public execute(): Promise source

This invoke a request to OpenGate North API and the callback is managed by promises

Override:

BaseSearch#execute

Return:

Promise

Return Properties:

NameTypeAttributeDescription
then function(result: object, statusCode: number)

When request it is OK

catch function(error: string)

When request it is NOK