Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
docs: add some meta tweak
Browse files Browse the repository at this point in the history
Signed-off-by: Antoine Leblanc <[email protected]>
  • Loading branch information
antleblanc committed Jan 9, 2020
1 parent 4d495ef commit 191bfa6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ovh-api-services

> Contains all $resource for API.
> Contains all AngularJS $resource for the OVHcloud API.
[![Downloads](https://badgen.net/npm/dt/ovh-api-services)](https://npmjs.com/package/ovh-api-services) [![Dependencies](https://badgen.net/david/dep/ovh-ux/ovh-api-services)](https://www.npmjs.com/package/ovh-api-services?activeTab=dependencies) [![Dev Dependencies](https://badgen.net/david/dev/ovh-ux/ovh-api-services)](https://www.npmjs.com/package/ovh-api-services?activeTab=dependencies) [![Gitter](https://badgen.net/badge/gitter/ovh-ux/blue?icon=gitter)](https://gitter.im/ovh/ux)

Expand All @@ -15,19 +15,15 @@ $ yarn add ovh-api-services

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

angular
.module('myApp', [
'ovh-api-services',
]);
angular.module('myApp', [ovhApiServices]);
```

### Services

All services must return an [AngularJS $resource](https://docs.angularjs.org/api/ngResource/service/$resource) and can be called by using:


| Service | Engine | Library |
|-----------|---------|----------------------------------------------------|
| `v6` | APIv6 | n/a |
Expand All @@ -45,11 +41,13 @@ OvhApiMe
.$promise
.then((nichandle) => {
console.log(nichandle);
// {
// "firstname": "John",
// "name": "Doe",
//
// }
/*
{
"firstname": "John",
"name": "Doe",
}
*/
});
```

Expand All @@ -65,18 +63,21 @@ OvhApiMe
.$promise
.then((sshKey) => {
console.log(sshKey);
// {
// "keyName": "test",
// "key": "ssh-rsa …",
// "default": false
// }
/*
{
"keyName": "test",
"key": "ssh-rsa …",
"default": false
}
*/
});
```

## Structure

The files structure is defined as:
```sh
$ tree src/api/
.
└── me
├── sshKey
Expand All @@ -96,8 +97,8 @@ $ yarn test

## Related

* [@ovh-ux/ng-ovh-api-wrappers][ng-ovh-api-wrappers] - AngularJS component designed to configure API Endpoints.
* [@ovh-ux/ng-ovh-swimming-poll](https://github.com/ovh-ux/ng-ovh-swimming-poll) - A poller to swim easily to success status.
- [@ovh-ux/ng-ovh-api-wrappers][ng-ovh-api-wrappers] - AngularJS component designed to configure API Endpoints.
- [@ovh-ux/ng-ovh-swimming-poll](https://github.com/ovh-ux/ng-ovh-swimming-poll) - A poller to swim easily to success status.

## Contributing

Expand Down
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"name": "ovh-api-services",
"version": "9.31.0",
"description": "Contains all angular $resource for OVH API.",
"version": "9.26.0",
"description": "Contains all AngularJS $resource for OVHcloud API.",
"keywords": [
"angularjs",
"api",
"ovh",
"ovhcloud",
"resource"
],
"repository": "ovh-ux/ovh-api-services",
"license": "BSD-3-Clause",
"author": "OVH SAS",
Expand Down

0 comments on commit 191bfa6

Please sign in to comment.