I want to consume an already configured vConnect API in my custom java code.
Is there any library available to access my VRT?
I want to consume an already configured vConnect API in my custom java code.
Is there any library available to access my VRT?
Yes, we can use below boilerplate dependency in our spring boot java code:
<dependency>
<groupId>com.decimaltech.boot</groupId>
<artifactId>decimal-spring-boot-starter</artifactId>
<version>0.0.7</version>
</dependency>
@Autowired
VahanaFactory vahanaFactory;
// Call Vahana Component (DBES,VAHANAHUB,DBES,IGW,SERVICE)
VahanaConnector connector = vahanaFactory.getConnector(Api.IGW); // DBES/VAHANAHUB,SERVICE
Object o = connector.performVahanaIntegration(identifier, "<API_NAME/SERVICE_NAME>", headers, request);
Thanks for this.
Can you elaborate this?
For e.g. what do we need in case of
Also what if we want the same functionality in other languages like python and nodejs?
We have different types of Vahana Connectors.
For Service:
VahanaConnector connector = vahanaFactory.getConnector(Api.SERVICE);
Object o = connector.performVahanaIntegration(identifier, "<SERVICE_NAME>", headers, request);
For DBES API:
VahanaConnector connector = vahanaFactory.getConnector(Api.DBES);
Object o = connector.performVahanaIntegration(identifier, "<API_NAME>", headers, request);
For IGW API:
VahanaConnector connector = vahanaFactory.getConnector(Api.IGW);
Object o = connector.performVahanaIntegration(identifier, "<API_NAME>", headers, request);
For VahanaHub:
VahanaConnector connector = vahanaFactory.getConnector(Api.VAHANAHUB);
Object o = connector.performVahanaIntegration(identifier, "<API_NAME>", headers, request);
For Other Rest API:
VahanaConnector simpleRestConnector = vahanaFactory.getConnector(Api.SIMPLE_REST);
String o = simpleRestConnector.performRestIntegration(identifier, new HttpHeaders(), HttpMethod.GET, "url", "",String.class);
This library is currently available in Java Only.
Great! thanks a ton.