1.1.6 • Published 3 years ago
connector-ri v1.1.6
Connector-RI
This connector implements the logic needed to connect the SDK-RI and SDK-Core, providing an abstraction used by the Web-RI
Quick start
npm install connector-ri
How to use
import Connector from 'connector-ri'
SDK-RI
const connector = new Connector(ENDPOINT_URL, USERNAME, PASSWORD)
# for using SDK-RI api functions, the ENDPOINT_URL must be the corresponding endpoint from each pilot, and the USERNAME and PASSWORD must be described in order to authenticate in keycloak.
# after successfully login, the keycloak generates an access token and the connector will consume the SDK-RI api functions
Semantic Engine
const connector = new Connector(ENDPOINT_URL)
# for using Semantic Engine api functions, the ENDPOINT_URL must be the corresponding endpoint from each pilot. USERNAME and PASSWORD can't be described
Available functions
getOfferings() # get list of offerings
getProviders() # get list of providers
getOffering(OFFERING_ID) # get details for a specific offering
getProviderOfferings(PROVIDER_ID) # get list of offerings from a provider
getCategoryOfferings(CATEGORY) # get list of offering from a category
getOfferingsByCategory() # get list of offerings by categories
registerOffering(DATA) # register a new offering
deleteOffering(OFFERING_ID) # delete an offering
Example
const offerings = await connector.getProviderOfferings(PROVIDER_ID)