This connector implements the logic needed to connect the SDK-RI, providing an abstraction used by the Web-RI.
npm install @unparallel/connector-ri
import Connector from '@unparallel/connector-ri'
const connector = new Connector(SDK_RI_ENDPOINT, LOG_LEVEL)
// SDK_RI_ENDPOINT: pilot endpoint
// LOG_LEVEL (optional): logs level (more info: https://github.com/jonnyreeves/js-logger)
getOfferingTemplate(accessToken, idToken) // get template for register an offering
getOfferings(accessToken, idToken) // get list of offerings
getProviders(accessToken, idToken) // get list of providers
getCategories(accessToken, idToken) // get list of categories
getOffering(accessToken, idToken, OFFERING_ID) // get details for a specific offering
getProviderOfferings(accessToken, idToken, PROVIDER_ID) // get list of offerings from a provider
getCategoryOfferings(accessToken, idToken, CATEGORY) // get list of offering from a category
getOfferingsByCategory(accessToken, idToken) // get list of offerings by categories
getOfferingContractParameters(accessToken, idToken, OFFERING_ID) // get list of contract parameters from a specific category
registerOffering(accessToken, idToken, DATA) // register a new offering
deleteOffering(accessToken, idToken, OFFERING_ID) // delete an offering
updateOffering(accessToken, idToken, DATA) // update an offering
const offerings = await connector.getProviderOfferings(accessToken, idToken, PROVIDER_ID)
This repository has been created by:
Márcio Mateus [email protected]
Pedro Ferreira [email protected]
The code in ths repository is licensed under the MIT License.