JSPM

  • Created
  • Published
  • 0
  • Score
    100M100P100Q76200F
  • License MIT

Add typing to to ovh api vip

Package Exports

  • @ovh-api/vip

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/vip) 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 vip region Europe

This module contains all typing needed to use OvhCloud vip APIs, with hi-level IntelliSense / Code Completion

NPM Version

Setup

With npm:

npm install --save @ovh-api/api
npm install --save @ovh-api/me
npm install --save @ovh-api/vip
... Add all APIs you needs

Usage

import OvhEngine from '@ovh-api/api';
import apiMe from '@ovh-api/me';
import apiVip from '@ovh-api/vip';

const ovhEngine = new OvhEngine({ 
    certCache: './cert-cache.json', // optional cache certificat on disk.
    accessRules: 'GET /vip, GET /vip/*, GET /me', // optional limit the requested privileges.
});

const api = {
    me: apiMe(ovhEngine),
    vip: apiVip(ovhEngine),
}

const test = async () => {
    const { nichandle } = await api.me.$get();
    const data = await api.vip.$get();
    console.log(`${nichandle} have the following services:`);
    console.log(data);
}