Package Exports
- @ovh-api/horizon-view
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ovh-api/horizon-view) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
OVHCloud API client for horizon-view region Europe
This module contains all typing needed to use OvhCloud horizon-view APIs, with hi-level IntelliSense / Code Completion
Setup
With npm:
npm install --save @ovh-api/api
npm install --save @ovh-api/me
npm install --save @ovh-api/horizon-view
... Add all APIs you needs
Usage
import OvhEngine from '@ovh-api/api';
import apiMe from '@ovh-api/me';
import apiHorizonView from '@ovh-api/horizon-view';
const ovhEngine = new OvhEngine({
certCache: './cert-cache.json', // optional cache certificat on disk.
accessRules: 'GET /horizonView, GET /horizonView/*, GET /me', // optional limit the requested privileges.
});
const api = {
me: apiMe(ovhEngine),
horizonView: apiHorizonView(ovhEngine),
}
const test = async () => {
const { nichandle } = await api.me.$get();
const data = await api.horizonView.$get();
console.log(`${nichandle} have the following services:`);
console.log(data);
}