python-terminusgps 36.7.0__py3-none-any.whl → 36.7.2__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.
Potentially problematic release.
This version of python-terminusgps might be problematic. Click here for more details.
- {python_terminusgps-36.7.0.dist-info → python_terminusgps-36.7.2.dist-info}/METADATA +1 -1
- {python_terminusgps-36.7.0.dist-info → python_terminusgps-36.7.2.dist-info}/RECORD +7 -7
- terminusgps/wialon/items/resource.py +3 -2
- terminusgps/wialon/items/unit.py +22 -18
- terminusgps/wialon/items/user.py +1 -1
- {python_terminusgps-36.7.0.dist-info → python_terminusgps-36.7.2.dist-info}/WHEEL +0 -0
- {python_terminusgps-36.7.0.dist-info → python_terminusgps-36.7.2.dist-info}/licenses/COPYING +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version: 36.7.
|
|
3
|
+
Version: 36.7.2
|
|
4
4
|
Summary: Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more.
|
|
5
5
|
Project-URL: Documentation, https://docs.terminusgps.com
|
|
6
6
|
Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
|
|
@@ -42,17 +42,17 @@ terminusgps/wialon/utils.py,sha256=iGOY8v7cNaSoA9Mo17d1bKAQMBtcotGq3FEQrghgvCo,1
|
|
|
42
42
|
terminusgps/wialon/validators.py,sha256=j5vrtcfClAzRdRkWTvRRAmrne1t0R6cKkmYdE7fAkSs,4247
|
|
43
43
|
terminusgps/wialon/items/__init__.py,sha256=3BVthghekMvhMQSzQgBMlD_phxmKSmp3Zvmo-z0O8Bs,211
|
|
44
44
|
terminusgps/wialon/items/base.py,sha256=ZScO0Fi6qYd1aGvUe9kfmbZK2ezUWBI-Qqowv0foVwg,10781
|
|
45
|
-
terminusgps/wialon/items/resource.py,sha256=
|
|
45
|
+
terminusgps/wialon/items/resource.py,sha256=X14qvYB9a8OH_LZfFL4BiaEPLnc6O-6OXN1SqRw7Ig8,18219
|
|
46
46
|
terminusgps/wialon/items/retranslator.py,sha256=2J1x7lNxRck-IEXrmJ7RM9bVL60mrZkfmczOSiUhiO8,3873
|
|
47
47
|
terminusgps/wialon/items/route.py,sha256=2dEUK9o8nwutPE03W-5GUcZrjGvbwLoExVnFV9LyedE,1326
|
|
48
|
-
terminusgps/wialon/items/unit.py,sha256=
|
|
48
|
+
terminusgps/wialon/items/unit.py,sha256=r5Fu6s9a5kS1Tk1jyqQodYeqKl-LjGOotGBP4kvCU2s,11836
|
|
49
49
|
terminusgps/wialon/items/unit_group.py,sha256=HhYMZ9b7UATXeEgHkXN9r5-M_w82fabjDYADCUwBtxQ,4442
|
|
50
|
-
terminusgps/wialon/items/user.py,sha256=
|
|
50
|
+
terminusgps/wialon/items/user.py,sha256=pR6OTrm6f7Zo0J8eLvKtWVsdhGi430OxMsMMthGh8YE,5382
|
|
51
51
|
terminusgps/wialon/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
52
|
terminusgps/wialon/tests/test_items.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
53
|
terminusgps/wialon/tests/test_session.py,sha256=9mBlYchMo9NeqRIZsmxYzrM1zBHorqu4ooxqSNppLpI,1336
|
|
54
54
|
terminusgps/wialon/tests/test_utils.py,sha256=SK4PxJQGECFnzx_EQeRAQfsQ5_3FLaVcis2W9u_ibuI,1730
|
|
55
|
-
python_terminusgps-36.7.
|
|
56
|
-
python_terminusgps-36.7.
|
|
57
|
-
python_terminusgps-36.7.
|
|
58
|
-
python_terminusgps-36.7.
|
|
55
|
+
python_terminusgps-36.7.2.dist-info/METADATA,sha256=lqCMWbUlQmxlvFwZguueqYMmKNA4wwBNsEUTdqQRg3c,1264
|
|
56
|
+
python_terminusgps-36.7.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
57
|
+
python_terminusgps-36.7.2.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
58
|
+
python_terminusgps-36.7.2.dist-info/RECORD,,
|
|
@@ -8,7 +8,8 @@ from terminusgps.wialon.items.base import WialonBase
|
|
|
8
8
|
class WialonResource(WialonBase):
|
|
9
9
|
"""A Wialon `resource/account <https://help.wialon.com/en/wialon-hosting/user-guide/management-system/accounts-and-resources>`_."""
|
|
10
10
|
|
|
11
|
-
def __init__(self) -> None:
|
|
11
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
12
|
+
super().__init__(*args, **kwargs)
|
|
12
13
|
self._is_account = None
|
|
13
14
|
|
|
14
15
|
def create(
|
|
@@ -23,7 +24,7 @@ class WialonResource(WialonBase):
|
|
|
23
24
|
:type name: :py:obj:`str`
|
|
24
25
|
:param skip_creator_check: Bypass object creation restrictions while creating the resource.
|
|
25
26
|
:type skip_creator_check: :py:obj:`bool`
|
|
26
|
-
:raises ValueError: If ``creator_id``
|
|
27
|
+
:raises ValueError: If ``creator_id`` wasn't a digit.
|
|
27
28
|
:raises WialonError: If something went wrong with a Wialon API call.
|
|
28
29
|
:returns: The Wialon id for the new resource, if it was created.
|
|
29
30
|
:rtype: :py:obj:`int` | :py:obj:`None`
|
terminusgps/wialon/items/unit.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from datetime import datetime
|
|
1
2
|
from urllib.parse import urljoin
|
|
2
3
|
|
|
3
4
|
from django.conf import settings
|
|
@@ -82,28 +83,31 @@ class WialonUnit(WialonBase):
|
|
|
82
83
|
|
|
83
84
|
Response format:
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
| key | type
|
|
87
|
-
|
|
88
|
-
| ``"t"`` | :py:obj
|
|
89
|
-
|
|
90
|
-
| ``"y"`` | :py:obj:`float`
|
|
91
|
-
|
|
92
|
-
| ``"x"`` | :py:obj:`float`
|
|
93
|
-
|
|
94
|
-
| ``"z"`` | :py:obj:`float`
|
|
95
|
-
|
|
96
|
-
| ``"s"`` | :py:obj:`int`
|
|
97
|
-
|
|
98
|
-
| ``"c"`` | :py:obj:`int`
|
|
99
|
-
|
|
100
|
-
| ``"sc"`` | :py:obj:`int`
|
|
101
|
-
|
|
86
|
+
+----------+------------------------------+-----------------+
|
|
87
|
+
| key | type | desc |
|
|
88
|
+
+==========+==============================+=================+
|
|
89
|
+
| ``"t"`` | :py:obj:`~datetime.datetime` | Time (UTC) |
|
|
90
|
+
+----------+------------------------------+-----------------+
|
|
91
|
+
| ``"y"`` | :py:obj:`float` | Latitude |
|
|
92
|
+
+----------+------------------------------+-----------------+
|
|
93
|
+
| ``"x"`` | :py:obj:`float` | Longitude |
|
|
94
|
+
+----------+------------------------------+-----------------+
|
|
95
|
+
| ``"z"`` | :py:obj:`float` | Altitude |
|
|
96
|
+
+----------+------------------------------+-----------------+
|
|
97
|
+
| ``"s"`` | :py:obj:`int` | Speed |
|
|
98
|
+
+----------+------------------------------+-----------------+
|
|
99
|
+
| ``"c"`` | :py:obj:`int` | Course |
|
|
100
|
+
+----------+------------------------------+-----------------+
|
|
101
|
+
| ``"sc"`` | :py:obj:`int` | # of satellites |
|
|
102
|
+
+----------+------------------------------+-----------------+
|
|
102
103
|
|
|
103
104
|
"""
|
|
104
|
-
|
|
105
|
+
response = self.session.wialon_api.core_search_item(
|
|
105
106
|
**{"id": self.id, "flags": flags.DataFlag.UNIT_POSITION}
|
|
106
107
|
).get("pos", {})
|
|
108
|
+
if response:
|
|
109
|
+
response["t"] = datetime.fromtimestamp(response["t"])
|
|
110
|
+
return response
|
|
107
111
|
|
|
108
112
|
def execute_command(
|
|
109
113
|
self,
|
terminusgps/wialon/items/user.py
CHANGED
|
@@ -97,7 +97,7 @@ class WialonUser(WialonBase):
|
|
|
97
97
|
|
|
98
98
|
def update_password(self, old_password: str, new_password: str) -> None:
|
|
99
99
|
"""
|
|
100
|
-
Updates the user's password
|
|
100
|
+
Updates the user's password.
|
|
101
101
|
|
|
102
102
|
:param old_password: The user's original password.
|
|
103
103
|
:type old_password: :py:obj:`str`
|
|
File without changes
|
{python_terminusgps-36.7.0.dist-info → python_terminusgps-36.7.2.dist-info}/licenses/COPYING
RENAMED
|
File without changes
|