python-terminusgps 20.2.0__py3-none-any.whl → 20.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_terminusgps-20.2.0.dist-info → python_terminusgps-20.4.0.dist-info}/METADATA +1 -1
- {python_terminusgps-20.2.0.dist-info → python_terminusgps-20.4.0.dist-info}/RECORD +5 -5
- terminusgps/wialon/items/unit.py +34 -0
- {python_terminusgps-20.2.0.dist-info → python_terminusgps-20.4.0.dist-info}/WHEEL +0 -0
- {python_terminusgps-20.2.0.dist-info → python_terminusgps-20.4.0.dist-info}/licenses/COPYING +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version: 20.
|
|
3
|
+
Version: 20.4.0
|
|
4
4
|
Summary: Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more.
|
|
5
5
|
Project-URL: Documentation, https://app.terminusgps.com/docs/apps/python-terminusgps/index.html
|
|
6
6
|
Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
|
|
@@ -26,10 +26,10 @@ terminusgps/wialon/items/notification.py,sha256=6IrswN6fdEkJErIqtMq45bTl9xVARQw8
|
|
|
26
26
|
terminusgps/wialon/items/resource.py,sha256=79SwbCyE1zlaoeBfU0erEqvqBAYUC4KAKs8AOLJqflU,9652
|
|
27
27
|
terminusgps/wialon/items/retranslator.py,sha256=8q9EDc92w92MElnHIeEzH3Ra4kiPXrx4t9V5nPDZuRU,3728
|
|
28
28
|
terminusgps/wialon/items/route.py,sha256=PTJx1gmT_PGz7nlSSUS2VzjYD-aAuvkEOIdIFneUSSQ,1148
|
|
29
|
-
terminusgps/wialon/items/unit.py,sha256=
|
|
29
|
+
terminusgps/wialon/items/unit.py,sha256=sXgEW3mbGgHCI9-lD69voy8yiKv39rKJei6ybYODKpM,8531
|
|
30
30
|
terminusgps/wialon/items/unit_group.py,sha256=vGVJMBY1BrKK0tP-C1DCIz4Bh6P-HKRnKY1g8g95UIs,5031
|
|
31
31
|
terminusgps/wialon/items/user.py,sha256=INwAibQVmjNNelepQXMfDevgJqMvIjHHgEjAMLRvhB0,7082
|
|
32
|
-
python_terminusgps-20.
|
|
33
|
-
python_terminusgps-20.
|
|
34
|
-
python_terminusgps-20.
|
|
35
|
-
python_terminusgps-20.
|
|
32
|
+
python_terminusgps-20.4.0.dist-info/METADATA,sha256=H4fLla1mYyBTae65x2DTnTWjfKkekP0Arjs61rGBzPE,912
|
|
33
|
+
python_terminusgps-20.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
34
|
+
python_terminusgps-20.4.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
35
|
+
python_terminusgps-20.4.0.dist-info/RECORD,,
|
terminusgps/wialon/items/unit.py
CHANGED
|
@@ -36,12 +36,46 @@ class WialonUnit(WialonBase):
|
|
|
36
36
|
)
|
|
37
37
|
return int(response.get("item", {}).get("id")) if response.get("item") else None
|
|
38
38
|
|
|
39
|
+
def populate(self) -> None:
|
|
40
|
+
super().populate()
|
|
41
|
+
response = self.session.wialon_api.core_search_item(
|
|
42
|
+
**{
|
|
43
|
+
"id": self.id,
|
|
44
|
+
"flags": sum(
|
|
45
|
+
[flags.DATAFLAG_UNIT_ADVANCED_PROPERTIES, flags.DATAFLAG_UNIT_IMAGE]
|
|
46
|
+
),
|
|
47
|
+
}
|
|
48
|
+
).get("item", {})
|
|
49
|
+
self._imei_number = response.get("uid")
|
|
50
|
+
self._active = response.get("act", False)
|
|
51
|
+
self._image_uri = response.get("uri")
|
|
52
|
+
|
|
53
|
+
def get_position(self) -> dict:
|
|
54
|
+
return self.session.wialon_api.core_search_item(
|
|
55
|
+
**{"id": self.id, "flags": flags.DATAFLAG_UNIT_POSITION}
|
|
56
|
+
)
|
|
57
|
+
|
|
39
58
|
@property
|
|
40
59
|
def available_commands(self) -> dict:
|
|
41
60
|
return self.session.wialon_api.core_get_hw_cmds(
|
|
42
61
|
**{"deviceTypeId": 0, "unitId": self.id}
|
|
43
62
|
)
|
|
44
63
|
|
|
64
|
+
@property
|
|
65
|
+
def image_uri(self) -> str:
|
|
66
|
+
return self._image_uri
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def imei_number(self) -> int | None:
|
|
70
|
+
if self._imei_number:
|
|
71
|
+
return int(self._imei_number)
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def active(self) -> bool:
|
|
75
|
+
if self._active:
|
|
76
|
+
return bool(self._active)
|
|
77
|
+
return False
|
|
78
|
+
|
|
45
79
|
def execute_command(
|
|
46
80
|
self,
|
|
47
81
|
name: str,
|
|
File without changes
|
{python_terminusgps-20.2.0.dist-info → python_terminusgps-20.4.0.dist-info}/licenses/COPYING
RENAMED
|
File without changes
|