Git Product home page Git Product logo

ovh-api-services's Introduction

ovh-api-services

Contains all AngularJS $resource for the OVHcloud API.

Downloads Dependencies Dev Dependencies Gitter

Install

$ yarn add ovh-api-services

Usage

import angular from 'angular';
import ovhApiServices from 'ovh-api-services';

angular.module('myApp', [ovhApiServices]);

Services

All services must return an AngularJS $resource and can be called by using:

Service Engine Library
v6 APIv6 n/a
v7 APIv7 @ovh-ux/ng-ovh-api-wrappers
Iceberg Iceberg @ovh-ux/ng-ovh-api-wrappers
Aapi 2API n/a

How to get user informations?

OvhApiMe
  .v6()
  .get()
  .$promise
  .then((nichandle) => {
    console.log(nichandle);
    /*
    {
      "firstname": "John",
      "name": "Doe",

    }
    */
  });

How to get a SSH Key detail?

OvhApiMe
  .SshKey()
  .v6()
  .get({
    keyName: 'YOUR_KEY_NAME',
  })
  .$promise
  .then((sshKey) => {
    console.log(sshKey);
    /*
    {
      "keyName": "test",
      "key": "ssh-rsa …",
      "default": false
    }
    */
  });

Structure

The files structure is defined as:

$ tree src/api/
.
└── me
    ├── sshKey
    │   ├── me-sshKey.service.js
    │   └── me-sshKey.v6.service.js
    ├── me.service.js
    └── me.v6.service.js

The directories structure must follow the structure of the API.

Test

$ yarn test

Related

Contributing

Always feel free to help out! Whether it's filing bugs and feature requests or working on some of the open issues, our contributing guide will help get you started.

License

BSD-3-Clause © OVH SAS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.