class Place::LocationServices

Defined in:

place/location_services.cr

Constant Summary

SUCCESS_RESPONSE = {HTTP::Status::OK, {} of String => String, nil}

=============================== IP ADDRESS => MAC ADDRESS

Class Method Summary

Instance Method Summary

Class Method Detail

def self.driver_interface : String #

Instance Method Detail

def building_id : String #

[View source]
def check_ownership_of(mac_address : String) #

Will return nil or {"location": "wireless", "assigned_to": "bob123", "mac_address": "abcd"}


[View source]
def device_locations(zone_id : String, location : String | Nil = nil) #

Will return an array of devices and their x, y coordinates


[View source]
def get_building_id #

Finds the building ID for the current location services object


[View source]
def get_systems_list #

Grabs the list of systems in the building


[View source]
def ip_mappings(method : String, headers : Hash(String, Array(String)), body : String) #

Webhook handler for accepting IP address to username mappings This data is typically obtained via domain controller logs


[View source]
def locate_contacts(list_name : String) #

locates all the of the emergency contacts


[View source]
def locate_user(email : String | Nil = nil, username : String | Nil = nil) #

Runs through all the services that support the Locatable interface requests location information on the identifier for all of them concatenates the results and returns them as a single array


[View source]
def mac_address_mappings(method : String, headers : Hash(String, Array(String)), body : String) #

[View source]
def macs_assigned_to(email : String | Nil = nil, username : String | Nil = nil) #

Will return an array of MAC address strings lowercase with no seperation characters abcdeffd1234 etc


[View source]
def on_load #

[View source]
def on_update #

[View source]
def sensor(mac : String, id : String | Nil = nil) #

[View source]
def sensors(type : String | Nil = nil, mac : String | Nil = nil, zone_id : String | Nil = nil) #

sensor search + filtered search


[View source]
def systems : Hash(String, Array(String)) #

[View source]
def update_contacts_list #

[View source]