Device Events¶
Base Device Object¶
-
class
jook.models.webhooks.
BaseDevice
(*args, **kwargs)[source]¶ Base class for computer and mobile device webhooks.
If
randomize
has been set toTrue
and aDeviceData
object has not been passed, the instantiatedDeviceData
object will be created with therandomized
argument set.Parameters: - device (DeviceData) –
- location (LocationData) –
Computer Events¶
-
class
jook.models.webhooks.
Computer
(*args, **kwargs)[source]¶ The base BaseWebhook object for ‘Computer’ events.
If
randomize
has been set toTrue
and aDeviceData
object has not been passed, the instantiatedDeviceData
object will be created with therandomized
argument set.Parameters: - device (DeviceData) –
- location (LocationData) –
-
data
¶ Return
data
for the object as a dictionary.Returns: data
as a dictionary objectReturn type: dict
Mobile Device Events¶
-
class
jook.models.webhooks.
MobileDevice
(*args, **kwargs)[source]¶ The base Webhook object for ‘Mobile Device’ events.
If
randomize
has been set toTrue
and aDeviceData
object has not been passed, the instantiatedDeviceData
object will be created with therandomized
argument set.Parameters: - device (DeviceData) –
- location (LocationData) –
-
data
¶ Return
data
for the object as a dictionary.Returns: data
as a dictionary objectReturn type: dict
Device Data Sets¶
Device Data¶
-
class
jook.models.data_sets.
DeviceData
(device_type='computer', mac_address=None, mac_address_alt=None, serial_number=None, uuid=None, randomize=False)[source]¶ An object representing device identifiers for computer and monbile device webhooks.
Instantiate a DeviceData object.
Pass values for the different attributes to manually customize the data.
If no arguments are passed the initial values are randomly generated and saved.
Parameters: - device_type (str) – The type of device to determine how certain
identifiers are generated. Must be``computer`` or
mobile
. - mac_address (str) –
- mac_address_alt (str) –
- serial_number (str) –
- uuid (str) –
- randomize (bool) – If
True
, no initial values will be set (passed args will be ignored) and a random value will be generated each time an attribute is called.
-
mac_address
¶ Return the value for
mac_address
.
-
mac_address_alt
¶ Return the value for
mac_address_alt
.
-
serial_number
¶ Return the value for
serial_number
.
-
set_mac_address
(mac_address=None)[source]¶ Set the value for
mac_address
.If a value is not passed a randomized value will be stored.
-
set_mac_address_alt
(mac_address=None)[source]¶ Set the value for
mac_address_alt
.If a value is not passed a randomized value will be stored.
-
set_serial_number
(serial_number=None)[source]¶ Set the value for
serial_number
.If a value is not passed a randomized value will be stored.
-
set_uuid
(uuid=None)[source]¶ Set the value for
uuid
.If a value is not passed a randomized value will be stored.
-
uuid
¶ Return the value for
uuid
.
- device_type (str) – The type of device to determine how certain
identifiers are generated. Must be``computer`` or