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
- getAIsService
- getFactory
- getLocalAIsService
- pingAIsService
- registerFactory
- getAIsService
- getInstance
- getLocalAIsService
- pingAIsService
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
Name | Type | Description |
---|---|---|
aisbreakerServerURL | string | URL of the remote AIsBreaker server |
props | AIsServiceProps | of the requested service (incl. propos.serviceId) |
auth? | Auth | optional auth object |
Returns
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
Name | Type |
---|---|
props | AIsServiceProps |
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
Name | Type | Description |
---|---|---|
props | AIsServiceProps | of the requested service (incl. propos.serviceId) |
auth? | Auth | optional auth object |
Returns
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:78
pingAIsService
▸ pingAIsService(aisbreakerServerURL
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
aisbreakerServerURL | string |
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
Name | Type |
---|---|
param | Object |
param.factory | AIsAPIFactory <AIsServiceProps , AIsService > |
param.serviceId | string |
Returns
void
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:32
getAIsService
▸ Static
getAIsService(aisbreakerServerURL
, props
, auth?
): AIsService
Parameters
Name | Type |
---|---|
aisbreakerServerURL | string |
props | AIsServiceProps |
auth? | Auth |
Returns
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:116
getInstance
▸ Static
getInstance(): AIsBreaker
Returns
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:22
getLocalAIsService
▸ Static
getLocalAIsService(props
, auth?
): AIsService
Parameters
Name | Type |
---|---|
props | AIsServiceProps |
auth? | Auth |
Returns
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:89
pingAIsService
▸ Static
pingAIsService(aisbreakerServerURL
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
aisbreakerServerURL | string |
Returns
Promise
<boolean
>
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/AIsBreaker.ts:143