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

Commit

Permalink
feat(universes): add aapi call for available universes
Browse files Browse the repository at this point in the history
  • Loading branch information
marie-j authored and jleveugle committed Apr 5, 2019
1 parent 11e5277 commit d4cf185
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/universes/universes.aapi.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
angular.module("ovh-api-services").service("OvhApiUniversesAapi", function ($resource, $cacheFactory) {
"use strict";

var cache = $cacheFactory("OvhApiUniversesAapi");

var universesResource = $resource("/universes", {
}, {
query: {
method: "GET",
isArray: true,
serviceType: "aapi",
cache: cache
}
});

universesResource.resetCache = function () {
cache.removeAll();
};

return universesResource;
});
8 changes: 8 additions & 0 deletions src/universes/universes.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
angular.module("ovh-api-services").service("OvhApiUniverses", function ($injector) {
"use strict";
return {
Aapi: function () {
return $injector.get("OvhApiUniversesAapi");
}
};
});

0 comments on commit d4cf185

Please sign in to comment.