Skip to content

unparallel-innovation/i3-MARKET-Connector-RI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connector-RI

This connector implements the logic needed to connect the SDK-RI, providing an abstraction used by the Web-RI.

Installation

npm install @unparallel/connector-ri

How to use

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)

Available functions

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

Example

const offerings = await connector.getProviderOfferings(accessToken, idToken, PROVIDER_ID)

Credits

This repository has been created by:

Márcio Mateus marcio.mateus@unparallel.pt

Pedro Ferreira pedro.ferreira@unparallel.pt

License

The code in ths repository is licensed under the MIT License.


This work was done in the context of i3-MARKET Research Project, which has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 871754

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published