@ovh-api/api
Ovh api connector implementation
Last updated 3 days ago by urielch .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @ovh-api/api 
SYNC missed versions from official npm registry.

@ovh-api

NPM Version

interactive usage

import ApiIp from '@ovh-api/ip';
import Ovh from '@ovh-api/api';

// accessRules can accepte rules separeted by comma, or an array of rules
// certCache save on disque the issued certificat for next program call.
const engine = new Ovh({accessRules: 'GET /ip, GET /me', certCache: 'secretToken.json'});

/**
 * you can build and api object to store all the sub-api you will used
 */
const api = {
    ip: ApiIp(engine)
    // me: ApiMe(engine)
    // cloud: ApiCloud(engine)
    // ...
}

/**
 * Using classic syntax
 * leave the OVH calls clearly available in the source code.
 */
async function printIP() {
    const ips = await api.ip.get('/ip')();
    return ips;
}

/**
 * Using Proxy object
 * shorter syntax
 */
async function printIPProxy() {
    const ips = await api.ip.$get();
    return ips;
}

printIP().then(console.log)

more Samples

working samples can be find here

Current Tags

  • 2.1.5                                ...           latest (3 days ago)

18 Versions

  • 2.1.5                                ...           3 days ago
  • 2.1.4                                ...           3 days ago
  • 2.1.3                                ...           17 days ago
  • 2.1.2                                ...           2 months ago
  • 2.1.1                                ...           2 months ago
  • 2.1.0                                ...           3 months ago
  • 2.0.0                                ...           7 months ago
  • 1.2.7                                ...           7 months ago
  • 1.2.6                                ...           7 months ago
  • 1.2.5                                ...           7 months ago
  • 1.2.4                                ...           7 months ago
  • 1.2.3                                ...           7 months ago
  • 1.2.2                                ...           8 months ago
  • 1.2.1                                ...           8 months ago
  • 1.2.0                                ...           8 months ago
  • 1.1.0                                ...           8 months ago
  • 1.0.0                                ...           8 months ago
  • 0.1.0                                ...           9 months ago
Maintainers (1)
Downloads
Today 0
This Week 50
This Month 64
Last Day 2
Last Week 0
Last Month 31
Dependencies (2)
Dev Dependencies (9)

Copyright 2014 - 2016 © taobao.org |