North Amplia REST
NorthAmpliaREST
NorthAmpliaREST Objects
class NorthAmpliaREST()This is a wrapper of a Rest api javascript
constructor
function constructor()This is a constructor of a Rest api javascript
Arguments:
_options{ url: string,port: string,version: string,apiKey: string,JTW: string} - this is configuration about Opengate North API.backendfunction - this is a backend selected to manage a request to Opengate North API.
default
function default() -> 'object'This return a default configuration object
Returns:
object
delete
function delete(url: string,timeout: number,headers: object,parameters: object,body: object,serviceBaseURL: string) -> 'Promise'Invoke DELETE action to url specified
Arguments:
urlstring - url to execute DELETEtimeoutnumber - timeout in millisecondsheadersobject - headers of requestparametersobject - parameters of requestbodyobject - body of requestserviceBaseURLstring - base of the uri petition
Returns:
Promise
get
function get(url: string,timeout: number,headers: object,parameters: object,asBlob: boolean,serviceBaseURL: string) -> 'Promise'Invoke GET action to url specified
Arguments:
urlstring - url to execute GETtimeoutnumber - timeout in millisecondsheadersobject - headers of requestparametersobject - parameters of requestasBlobboolean - response body as BlobserviceBaseURLstring - base of the uri petition
Returns:
Promise
patch
function patch(url: string,data: object,timeout: number,headers: object,parameters: object,serviceBaseURL: string) -> 'Promise'Invoke PATCH action to url and data specified
Arguments:
urlstring - url to execute PATCHdataobject - attach data to request PATCHtimeoutnumber - timeout in millisecondsheadersobject - headers of requestparametersobject - parameters of requestserviceBaseURLstring - base of the uri petition
Returns:
Promise
post
function post(url: string,data: object,timeout: number,headers: object,parameters: object,serviceBaseURL: string) -> 'Promise'Invoke POST action to url and data specified
Arguments:
urlstring - url to execute POSTdataobject - attach data to request POSTtimeoutnumber - timeout in millisecondsheadersobject - headers of requestparametersobject - parameters of requestserviceBaseURLstring - base of the uri petition
Returns:
Promise
post_multipart
function post_multipart(url: string,formData: FormData,events: object,timeout: number,headers: object,parameters: object,serviceBaseURL: string) -> 'Promise'Invoke POST multipart action to url and data specified
Arguments:
urlstring - url to execute POSTformDataFormData - attach data to request POSTeventsobject - events allowed, xhr.processtimeoutnumber - timeout in millisecondsheadersobject - headers of requestparametersobject - parameters of requestserviceBaseURLstring - base of the uri petition
Returns:
Promise
put
function put(url: string,data: object,timeout: number,headers: object,parameters: object,serviceBaseURL: string) -> 'Promise'Invoke PUT action to url and data specified
Arguments:
urlstring - url to execute PUTdataobject - attach data to request PUTtimeoutnumber - timeout in millisecondsheadersobject - headers of requestparametersobject - parameters of requestserviceBaseURLstring - base of the uri petition
Returns:
Promise
put_multipart
function put_multipart(url: string,formData: FormData,events: object,timeout: number,headers: object,parameters: object,serviceBaseURL: string) -> 'Promise'Invoke put multipart action to url and data specified
Arguments:
urlstring - url to execute POSTformDataFormData - attach data to request POSTeventsobject - events allowed, xhr.processtimeoutnumber - timeout in millisecondsheadersobject - headers of requestparametersobject - parameters of requestserviceBaseURLstring - base of the uri petition
Returns:
Promise