1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- /**
- * Created by robin on 11/21/15.
- */
- (function () {
- 'use strict';
-
- angular.module('camotionSdk')
- .factory('CamerasService', ['luticateRequest', function (luticateRequest) {
-
- var CamerasService = {};
-
- CamerasService.add = function(data, promise)
- {
- return luticateRequest.post("/api/cameras/add", {camera: JSON.stringify(data)}, null, promise);
- };
-
- CamerasService.getAll = function(data, promise)
- {
- return luticateRequest.get("/api/cameras", data, promise);
- };
-
- CamerasService.getAllTypes = function(promise)
- {
- return luticateRequest.get("/api/cameras/types", null, promise);
- };
-
- CamerasService.get = function(data, promise)
- {
- return luticateRequest.get("/api/cameras/" + data.camera_id , null, promise);
- };
-
- CamerasService.edit = function(data, promise)
- {
- return luticateRequest.post("/api/cameras/" + data.camera_id + "/edit", {camera: JSON.stringify(data)}, null, promise);
- };
-
- CamerasService.del = function(data, promise)
- {
- return luticateRequest.post("/api/cameras/" + data.camera_id + "/del", null, null, promise);
- };
-
- return CamerasService;
- }]);
- })();
|