Skip to content

aisbreaker-api-js - v0.1.15 / api/AIsBreaker / AIsBreaker

Class: AIsBreaker

api/AIsBreaker.AIsBreaker

Class to create and manage service APIs.

Starting point for app code / for code using the AIs framework.

Table of contents

Constructors

Methods

Constructors

constructor

new AIsBreaker()

Defined in

aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:19

Methods

getAIsService

getAIsService(aisbreakerServerURL, props, auth?): AIsService

Get a service API for the given props (which include the serviceId) from a remote AIsBreaker server.

Inclusive all default filters. They will be added here during creation.

Parameters

NameTypeDescription
aisbreakerServerURLstringURL of the remote AIsBreaker server
propsAIsServicePropsof the requested service (incl. propos.serviceId)
auth?Authoptional auth object

Returns

AIsService

Defined in

aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:105


getFactory

getFactory(props): AIsAPIFactory<AIsServiceProps, AIsService>

TODO: make this more intelligent to find services that do not exactly match the given serviceId

Parameters

NameType
propsAIsServiceProps

Returns

AIsAPIFactory<AIsServiceProps, AIsService>

Defined in

aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:40


getLocalAIsService

getLocalAIsService(props, auth?): AIsService

Get a service API for the given props (which include the serviceId).

Inclusive all default filters. They will be added here during creation.

Parameters

NameTypeDescription
propsAIsServicePropsof the requested service (incl. propos.serviceId)
auth?Authoptional auth object

Returns

AIsService

Defined in

aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:78


pingAIsService

pingAIsService(aisbreakerServerURL): Promise<boolean>

Parameters

NameType
aisbreakerServerURLstring

Returns

Promise<boolean>

Defined in

aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:121


registerFactory

registerFactory(param): void

Register a service API factory with its serviceId.

Parameters

NameType
paramObject
param.factoryAIsAPIFactory<AIsServiceProps, AIsService>
param.serviceIdstring

Returns

void

Defined in

aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:32


getAIsService

Static getAIsService(aisbreakerServerURL, props, auth?): AIsService

Parameters

NameType
aisbreakerServerURLstring
propsAIsServiceProps
auth?Auth

Returns

AIsService

Defined in

aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:116


getInstance

Static getInstance(): AIsBreaker

Returns

AIsBreaker

Defined in

aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:22


getLocalAIsService

Static getLocalAIsService(props, auth?): AIsService

Parameters

NameType
propsAIsServiceProps
auth?Auth

Returns

AIsService

Defined in

aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:89


pingAIsService

Static pingAIsService(aisbreakerServerURL): Promise<boolean>

Parameters

NameType
aisbreakerServerURLstring

Returns

Promise<boolean>

Defined in

aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:143

Released under the MIT License.