@ovh-api/deskaas
v4.0.3
Published
Add typing to to ovh api deskaas
Maintainers
Readme
OVHCloud API client for deskaas region Europe
This module contains all typing needed to use OvhCloud deskaas 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/deskaas
... Add all APIs you needsUsage
import OvhEngine from '@ovh-api/api';
import apiMe from '@ovh-api/me';
import apiDeskaas from '@ovh-api/deskaas';
const ovhEngine = new OvhEngine({
certCache: './cert-cache.json', // optional cache certificat on disk.
accessRules: 'GET /deskaas, GET /deskaas/*, GET /me', // optional limit the requested privileges.
});
const api = {
me: apiMe(ovhEngine),
deskaas: apiDeskaas(ovhEngine),
}
const test = async () => {
const { nichandle } = await api.me.$get();
const data = await api.deskaas.$get();
console.log(`${nichandle} have the following services:`);
console.log(data);
}