1angular.module('IotaSmart.service') 2 3 .service('GeofenceService', function ($http, API_URL) { 4 return { 5 getAllGeofence: function (userId) { 6 return $http({ 7 method: 'GET', 8 headers: { 'Content-Type': 'application/json' }, 9 url: API_URL + "/userdeviceservice/v1/geofence/user/all", 10 params: { 'userId': userId } 11 }).then(function successCallback(response) { 12 return response; 13 }, function errorCallback(error) { 14 return error; 15 }); 16 }, 17 getAssignedVehicleList: function (geofenceId) { 18 return $http({ 19 method: 'GET', 20 headers: { 'Content-Type': 'application/json' }, 21 url: API_URL + "/userdeviceservice/v1/geofence/assigned/list", 22 params: { 'geofenceId': geofenceId } 23 }).then(function successCallback(response) { 24 return response; 25 }, function errorCallback(error) { 26 return error; 27 }); 28 }, 29 addGeofence : function (entity) { 30 return $http({ 31 method: 'POST', 32 url: API_URL+"/userdeviceservice/v1/geofence/", 33 headers: {'Content-Type': 'application/json'}, 34 data:entity 35 }).then(function successCallback(response) { 36 return response; 37 }, function errorCallback(error) { 38 return error; 39 }); 40 }, 41 updateGeofence : function (entity,geofenceId) { 42 return $http({ 43 method: 'PUT', 44 url: API_URL+"/userdeviceservice/v1/geofence/"+geofenceId, 45 headers: {'Content-Type': 'application/json'}, 46 data:entity 47 }).then(function successCallback(response) { 48 return response; 49 }, function errorCallback(error) { 50 return error; 51 }); 52 }, 53 deleteGeofence : function(geofenceId){ 54 return $http({ 55 method: 'DELETE', 56 url: API_URL+"/userdeviceservice/v1/geofence/"+geofenceId, 57 headers: {'Content-Type': 'application/json'} 58 }).then(function successCallback(response) { 59 return response; 60 }, function errorCallback(error) { 61 return error; 62 }); 63 }, 64 assignVehicle : function (deviceId,geofenceId) { 65 return $http({ 66 method: 'PUT', 67 url: API_URL+"/userdeviceservice/v1/geofence/assign", 68 headers: {'Content-Type': 'application/json'}, 69 params: { 'deviceIds': deviceId, 'geofenceId': geofenceId } 70 }).then(function successCallback(response) { 71 return response; 72 }, function errorCallback(error) { 73 return error; 74 }); 75 }, 76 deassignVehicle : function(deviceId, geofenceId){ 77 return $http({ 78 method: 'DELETE', 79 url: API_URL+"/userdeviceservice/v1/geofence/de-assign", 80 headers: {'Content-Type': 'application/json'}, 81 params: { 'deviceId': deviceId, 'geofenceId': geofenceId } 82 }).then(function successCallback(response) { 83 return response; 84 }, function errorCallback(error) { 85 return error; 86 }); 87 }, 88 } 89 })
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.