-
createChatroom(vehicleId)
-
Creates a chatroom for the stolen vehicle.
Parameters:
| Name |
Type |
Description |
vehicleId |
String
|
a vehicle's id |
- Source:
-
diffTime(end, start) → {Number|Boolean}
-
Parameters:
| Name |
Type |
Description |
end |
String
|
the ending timestamp |
start |
String
|
the starting timestamp |
- Source:
Returns:
the difference in milliseconds or false on error
-
Type
-
Number
|
Boolean
-
notifyNearbyUsers()
-
Cycle through every stolen vehicle and notify users within specified radius that the vehicle is stolen.
- Source:
-
processTrackerAlert(req, resp, next)
-
process alert that is sent from vehicle tracker
Parameters:
| Name |
Type |
Description |
req |
Object
|
the request object |
resp |
Object
|
the response object |
next |
function
|
|
- Source:
-
refereshRecoveredVehicles(onSuccess, onError)
-
after a certain interval of vehicle recovery,
resets vehicle status metadata
Parameters:
| Name |
Type |
Description |
onSuccess |
function
|
callback on success |
onError |
function
|
callback on error |
- Source:
-
sendPushNotification(alertKey, vehicle, message)
-
sends push notification to device based off of vehicle's owner id
Parameters:
| Name |
Type |
Description |
alertKey |
Number
|
the number corresponding the type of alert that is sent |
vehicle |
Object
|
the vehicle and its metadata |
message |
String
|
the message that we are sending |
- Source:
-
timestamp() → {String}
-
Returns a timestamp with the format 'mm-dd-yyyy hh:MM:ss'
- Source:
Returns:
the generated timestamp
-
Type
-
String
-
updateVehicleLocation(alert, vehicle)
-
Parameters:
| Name |
Type |
Description |
alert |
Object
|
the metadata associated with the vehicle tracker |
vehicle |
Object
|
the vehicle and its metadata |
- Source:
-
updateVehicleStatus(alert, vehicle, message)
-
Update the vehicle's alert level and location
and send notification to owner
Parameters:
| Name |
Type |
Description |
alert |
Object
|
the metadata associated with the vehicle tracker |
vehicle |
Object
|
the vehicle and its metadata |
message |
String
|
the message that we are sending |
- Source: