pyhOn/pyhon/connection/device.py

42 lines
895 B
Python
Raw Normal View History

2023-04-09 10:13:50 -06:00
import secrets
from pyhon import const
class HonDevice:
def __init__(self):
self._app_version = const.APP_VERSION
self._os_version = const.OS_VERSION
self._os = const.OS
self._device_model = const.DEVICE_MODEL
self._mobile_id = secrets.token_hex(8)
@property
def app_version(self):
return self._app_version
@property
def os_version(self):
return self._os_version
@property
def os(self):
return self._os
@property
def device_model(self):
return self._device_model
@property
def mobile_id(self):
return self._mobile_id
def get(self):
2023-04-09 12:55:36 -06:00
return {
"appVersion": self.app_version,
"mobileId": self.mobile_id,
"osVersion": self.os_version,
"os": self.os,
"deviceModel": self.device_model,
}