@ovh-soyoustart-ca/order

Add typing to to ovh api order


Keywords
ovh, ovhCloud, api, typing, typescript
License
MIT
Install
npm install @ovh-soyoustart-ca/order@3.1.12

Documentation

Use Ovh's Apis with TypeScript

  • NPM Version Api engine
  • NPM Version All api helper have the same version
  • NPM Version ovh-vps-config-failover Configure the IP failover of your vps
  • NPM Version ovh-bill-importer Import all ovh billing data

Samples

Find all sample here

Interactive mode with no Credential

Print account information of your OVH-account

import ApiMe from '@ovh-api/me';
import Ovh from '@ovh-api/api';

const ovh = new Ovh({accessRules: 'GET /ip'});
const api = new ApiMe(ovh);
api.get('/me').then(console.log)

You will be asked to authorized an new issued certificat.

Same thing With credential with a certificate

Create your first application tokens here: here

import ApiMe from '@ovh-api/me';
import Ovh from '@ovh-api/api';

const config = {
    appKey: String(process.env.APP_KEY),
    appSecret: String(process.env.APP_SECRET),
    consumerKey: String(process.env.CONSUMER_KEY)
};
const ovh = new Ovh(config);
const api = new ApiMe(ovh);
api.get('/me').then(console.log);

Same thing with a credential using the official Ovh api

Create your first application tokens here: here

import ApiMe from '@ovh-api/me';
import Ovh from require(ovh);

// Create your first application tokens here: https://api.ovh.com/createToken/?GET=/me
const config = {
    appKey: String(process.env.APP_KEY),
    appSecret: String(process.env.APP_SECRET),
    consumerKey: String(process.env.CONSUMER_KEY)
};
const ovh = new Ovh(config);
const api = new ApiMe(ovh);
api.get('/me').then(console.log);

For more sample see samples