HubAPI¶
Interface HubAPI
requestHubVersion(): Promise<string>;
requestServiceStates(): Promise<Map<ServiceType, ServiceState>>;
requestSupportedContentTypes(): Promise<ContentType[]>;
requestSupportedRenderSetups(): Promise<{ name: string; value: string }[]>;
}
Hierarchy (View Summary)
- HubAPI
Methods
request Hub Version
Request the current version of the connected instant3Dhub-backend. May return undefined for older versions.
Returns Promise<string>
Returns a Promise which contains a string containing the version of the connected backend.
request Service States
Requests all available services of the backend and their current state.
Returns Promise<Map<ServiceType, ServiceState>>
Returns a Promise which contains a map of all available services and their states.
request Supported Content Types
Request a list of (model) data formats which are supported by the connected instance3Dhub-backend. If requested before the connection to the Hub is established, it will return the local list of content types.
Returns Promise<ContentType[]>
Returns a Promise which contains the list of all supported data formats.
request Supported Render Setups
Request all supported render setups if one or more are available. The render setup is a key value pair where the key is the name of the render setup and the value could be used as an input value for the ViewerSettingStrings.RENDER_SETUP setting.
Returns Promise<{ name: string; value: string }[]>
Returns a Promise which contains the list of supported render setups.
webvis: The HubAPI
Overview
The HubAPI provides functionalities to get information from the instant3Dhub-backend. This includes:
Every webvis instance requires a backend connection. The backend address is defined by SettingStrings.HUB_URL. Webvis will automatically connect to the backend in the background using the specified huburl.
Quick Start
Example: Request the supported content types from the backend.
Events
The following events are associated with the HubAPI: