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

Commit

Permalink
feat(working-status): add working-status aapi service
Browse files Browse the repository at this point in the history
ref: OM-184
  • Loading branch information
cbourgois authored and antleblanc committed Nov 15, 2018
1 parent 5d0ea68 commit 8b366bd
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 3 deletions.
37 changes: 37 additions & 0 deletions dist/ovh-api-services.js
Original file line number Diff line number Diff line change
Expand Up @@ -22090,6 +22090,43 @@ angular.module("ovh-api-services").service("OvhApiVrackV6", ["$resource", "$cach
return vracks;
}]);

angular.module("ovh-api-services").service("OvhApiWorkingStatusAapi", ["$resource", "$cacheFactory", function ($resource, $cacheFactory) {
"use strict";

var cache = $cacheFactory("OvhApiWorkingStatusAapi");

var workingStatusResource = $resource("/working-status/:product", {
product: "@product"
}, {
get: {
method: "GET",
url: "/working-status/:product",
serviceType: "aapi",
cache: cache,
isArray: true
}
});

workingStatusResource.resetAllCache = function () {
workingStatusResource.resetCache();
};

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

return workingStatusResource;
}]);

angular.module("ovh-api-services").service("OvhApiWorkingStatus", ["$injector", function ($injector) {
"use strict";
return {
Aapi: function () {
return $injector.get("OvhApiWorkingStatusAapi");
}
};
}]);

angular.module("ovh-api-services").service("OvhApiXdslDeconsolidation", ["$injector", function ($injector) {
"use strict";
return {
Expand Down
6 changes: 3 additions & 3 deletions dist/ovh-api-services.min.js

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions src/working-status/working-status.aapi.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
angular.module("ovh-api-services").service("OvhApiWorkingStatusAapi", function ($resource, $cacheFactory) {
"use strict";

var cache = $cacheFactory("OvhApiWorkingStatusAapi");

var workingStatusResource = $resource("/working-status/:product", {
product: "@product"
}, {
get: {
method: "GET",
url: "/working-status/:product",
serviceType: "aapi",
cache: cache,
isArray: true
}
});

workingStatusResource.resetAllCache = function () {
workingStatusResource.resetCache();
};

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

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

0 comments on commit 8b366bd

Please sign in to comment.