EndpointFactory
Class with the static factory methods to create instances of Connection and APIs
Methods
getEventQueue
Gets the EventQueue instance.
getEventQueue()
Type | Description |
---|---|
Promise<EventQueue> | instance of EventQueue |
connect
Connects to the platform backend.
connect(userPrivKey, solutionId, bridgeUrl)
Name | Type | Description |
---|---|---|
userPrivKey | string | user's private key |
solutionId | string | ID of the Solution |
bridgeUrl | string | the Bridge Server URL |
Type | Description |
---|---|
Promise<Connection> | instance of Connection |
connectPublic
Connects to the Platform backend as a guest user.
connectPublic(solutionId, bridgeUrl)
Name | Type | Description |
---|---|---|
solutionId | string | ID of the Solution |
bridgeUrl | string | the Bridge Server URL |
Type | Description |
---|---|
Promise<Connection> | instance of Connection |
createThreadApi
Creates an instance of the Thread API.
createThreadApi(connection)
Name | Type | Description |
---|---|---|
connection | Connection | instance of Connection |
Type | Description |
---|---|
Promise<ThreadApi> | instance of ThreadApi |
createStoreApi
Creates an instance of the Store API.
createStoreApi(connection)
Name | Type | Description |
---|---|---|
connection | Connection | instance of Connection |
Type | Description |
---|---|
Promise<StoreApi> | instance of StoreApi |
createInboxApi
Creates an instance of the Inbox API.
createInboxApi(connection, threadApi, storeApi)
Name | Type | Description |
---|---|---|
connection | Connection | instance of Connection |
threadApi | ThreadApi | instance of ThreadApi |
storeApi | StoreApi | instance of StoreApi |
Type | Description |
---|---|
Promise<InboxApi> | instance of InboxApi |
createCryptoApi
Creates an instance of the Crypto API.
createCryptoApi()
Type | Description |
---|---|
Promise<CryptoApi> | instance of CryptoApi |