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

Commit

Permalink
feat(vps): add images and available routes
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyDec authored and antleblanc committed Jul 24, 2019
1 parent da982b2 commit 3b25207
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/vps/images/available/vps-images-available.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
angular.module("ovh-api-services").service("OvhApiVpsImagesAvailable", function ($injector) {
"use strict";

return {
v6: function () {
return $injector.get("OvhApiVpsImagesAvailableV6");
}
};
});
10 changes: 10 additions & 0 deletions src/vps/images/available/vps-images-available.v6.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
angular.module("ovh-api-services").service("OvhApiVpsImagesAvailableV6", function ($resource) {
"use strict";

return $resource("/vps/:serviceName/images/available", {
serviceName: "@serviceName"
}, {
query: { method: "GET", isArray: true },
get: { method: "GET", url: "/vps/:serviceName/images/available/:id" }
});
});
12 changes: 12 additions & 0 deletions src/vps/images/vps-images.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
angular.module("ovh-api-services").service("OvhApiVpsImages", function ($injector) {
"use strict";

return {
v6: function () {
return $injector.get("OvhApiVpsImagesV6");
},
Available: function () {
return $injector.get("OvhApiVpsImagesAvailable");
}
};
});
12 changes: 12 additions & 0 deletions src/vps/images/vps-images.v6.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
angular.module("ovh-api-services").service("OvhApiVpsImagesV6", function ($resource) {
"use strict";

return $resource("/vps/:serviceName/images", {
serviceName: "@serviceName"
}, {
getCurrent: {
url: "/vps/:serviceName/images/current",
method: "GET"
}
});
});
3 changes: 3 additions & 0 deletions src/vps/vps.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ angular.module("ovh-api-services").service("OvhApiVps", function ($injector) {
Aapi: function () {
return $injector.get("OvhApiVpsAapi");
},
Images: function () {
return $injector.get("OvhApiVpsImages");
},
Ips: function () {
return $injector.get("OvhApiVpsIps");
}
Expand Down

0 comments on commit 3b25207

Please sign in to comment.