JSPM

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

Add typing to to ovh api support

Package Exports

  • @ovh-api/support

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

This module contains all typing needed to use OvhCloud support 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/support
... Add all APIs you needs

Usage

import OvhEngine from '@ovh-api/api';
import apiMe from '@ovh-api/me';
import apiSupport from '@ovh-api/support';

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

const api = {
    me: apiMe(ovhEngine),
    support: apiSupport(ovhEngine),
}

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