python-terminusgps 20.7.0__py3-none-any.whl → 21.0.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.
Potentially problematic release.
This version of python-terminusgps might be problematic. Click here for more details.
- {python_terminusgps-20.7.0.dist-info → python_terminusgps-21.0.0.dist-info}/METADATA +1 -1
- {python_terminusgps-20.7.0.dist-info → python_terminusgps-21.0.0.dist-info}/RECORD +5 -5
- terminusgps/wialon/items/resource.py +52 -17
- {python_terminusgps-20.7.0.dist-info → python_terminusgps-21.0.0.dist-info}/WHEEL +0 -0
- {python_terminusgps-20.7.0.dist-info → python_terminusgps-21.0.0.dist-info}/licenses/COPYING +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version:
|
|
3
|
+
Version: 21.0.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
|
|
@@ -21,13 +21,13 @@ terminusgps/wialon/session.py,sha256=6xg65LZz6cebWclTQp1KRLvPss0aM-bWhAmmwiDOlMg
|
|
|
21
21
|
terminusgps/wialon/utils.py,sha256=IN45hASI6iP3Wd35ejGeoIYDIQ_w65-W05eVUdWFRxo,5712
|
|
22
22
|
terminusgps/wialon/items/__init__.py,sha256=3BVthghekMvhMQSzQgBMlD_phxmKSmp3Zvmo-z0O8Bs,211
|
|
23
23
|
terminusgps/wialon/items/base.py,sha256=EAtzlnCvB7WTu3iX1bV1-S9TvwXc-Eez7e0X4TMiK9U,6943
|
|
24
|
-
terminusgps/wialon/items/resource.py,sha256=
|
|
24
|
+
terminusgps/wialon/items/resource.py,sha256=5m0KdYu9lImNIfcAR8XcrZ6VnsXwGIQyXeRCHrx5EUo,14768
|
|
25
25
|
terminusgps/wialon/items/retranslator.py,sha256=8q9EDc92w92MElnHIeEzH3Ra4kiPXrx4t9V5nPDZuRU,3728
|
|
26
26
|
terminusgps/wialon/items/route.py,sha256=PTJx1gmT_PGz7nlSSUS2VzjYD-aAuvkEOIdIFneUSSQ,1148
|
|
27
27
|
terminusgps/wialon/items/unit.py,sha256=K5IoGSRoH_JiAZoKK6Wb9DToaDScaL7mPKqSOAwtg0A,8618
|
|
28
28
|
terminusgps/wialon/items/unit_group.py,sha256=vGVJMBY1BrKK0tP-C1DCIz4Bh6P-HKRnKY1g8g95UIs,5031
|
|
29
29
|
terminusgps/wialon/items/user.py,sha256=INwAibQVmjNNelepQXMfDevgJqMvIjHHgEjAMLRvhB0,7082
|
|
30
|
-
python_terminusgps-
|
|
31
|
-
python_terminusgps-
|
|
32
|
-
python_terminusgps-
|
|
33
|
-
python_terminusgps-
|
|
30
|
+
python_terminusgps-21.0.0.dist-info/METADATA,sha256=hFTGuFn_AJi118S-oxWMwIZAQCFI3Mv-6Bf78g8UNnw,912
|
|
31
|
+
python_terminusgps-21.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
32
|
+
python_terminusgps-21.0.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
33
|
+
python_terminusgps-21.0.0.dist-info/RECORD,,
|
|
@@ -287,8 +287,6 @@ class WialonResource(WialonBase):
|
|
|
287
287
|
desc: str = "",
|
|
288
288
|
phone: str = "",
|
|
289
289
|
mobile_auth_code: str = "",
|
|
290
|
-
image_checksum: str = "",
|
|
291
|
-
image_ratio: str = "",
|
|
292
290
|
custom_fields: dict[str, str] | None = None,
|
|
293
291
|
) -> None:
|
|
294
292
|
"""
|
|
@@ -331,17 +329,13 @@ class WialonResource(WialonBase):
|
|
|
331
329
|
params.update({"p": quote_plus(phone)})
|
|
332
330
|
if custom_fields:
|
|
333
331
|
params.update({"jp": custom_fields})
|
|
334
|
-
|
|
335
|
-
print(f"{response = }")
|
|
332
|
+
self.session.wialon_api.resource_update_driver(**params)
|
|
336
333
|
|
|
337
334
|
def create_passenger(
|
|
338
335
|
self,
|
|
339
336
|
name: str,
|
|
340
337
|
code: str,
|
|
341
338
|
phone: str = "",
|
|
342
|
-
timezone: int | None = None,
|
|
343
|
-
image_checksum: str = "",
|
|
344
|
-
image_ratio: float | None = None,
|
|
345
339
|
custom_fields: dict[str, str] | None = None,
|
|
346
340
|
) -> None:
|
|
347
341
|
"""
|
|
@@ -353,12 +347,6 @@ class WialonResource(WialonBase):
|
|
|
353
347
|
:type code: :py:obj:`str`
|
|
354
348
|
:param phone: A phone number beginning in a country code. No spaces.
|
|
355
349
|
:type phone: :py:obj:`str`
|
|
356
|
-
:param timezone: A timezone integer.
|
|
357
|
-
:type timezone: :py:obj:`int` | :py:obj:`None`
|
|
358
|
-
:param image_checksum: Checksum for passenger image.
|
|
359
|
-
:type image_checksum: :py:obj:`str`
|
|
360
|
-
:param image_ratio: Passenger image aspect ratio.
|
|
361
|
-
:type image_ratio: :py:obj:`float` | :py:obj:`None`
|
|
362
350
|
:param custom_fields: Additional custom fields to add to the passenger.
|
|
363
351
|
:type custom_fields: :py:obj:`dict` | :py:obj:`None`
|
|
364
352
|
:raises WialonError: If something goes wrong calling the Wialon API.
|
|
@@ -371,14 +359,61 @@ class WialonResource(WialonBase):
|
|
|
371
359
|
"id": 0,
|
|
372
360
|
"callMode": "create",
|
|
373
361
|
"c": code,
|
|
374
|
-
"ck": image_checksum,
|
|
375
|
-
"r": image_ratio,
|
|
376
362
|
"n": name,
|
|
377
363
|
}
|
|
378
364
|
if phone:
|
|
379
365
|
params.update({"p": quote_plus(phone)})
|
|
380
|
-
if timezone:
|
|
381
|
-
params.update({"tz": timezone})
|
|
382
366
|
if custom_fields:
|
|
383
367
|
params.update({"jp": custom_fields})
|
|
384
368
|
self.session.wialon_api.resource_update_tag(**params)
|
|
369
|
+
|
|
370
|
+
def update_attachable_drivers(self, units: list[str | int]) -> None:
|
|
371
|
+
"""Updates the pool of units for the resource to attach drivers to the new unit list."""
|
|
372
|
+
self.session.wialon_api.update_driver_units(
|
|
373
|
+
**{"itemId": self.id, "units": units}
|
|
374
|
+
)
|
|
375
|
+
|
|
376
|
+
def update_attachable_passengers(self, units: list[str | int]) -> None:
|
|
377
|
+
"""Updates the pool of units for the resource to attach passengers to the new unit list."""
|
|
378
|
+
self.session.wialon_api.update_tag_units(**{"itemId": self.id, "units": units})
|
|
379
|
+
|
|
380
|
+
def create_trailer(
|
|
381
|
+
self,
|
|
382
|
+
name: str,
|
|
383
|
+
code: str,
|
|
384
|
+
desc: str = "",
|
|
385
|
+
phone: str = "",
|
|
386
|
+
custom_fields: dict[str, str] | None = None,
|
|
387
|
+
) -> None:
|
|
388
|
+
"""
|
|
389
|
+
Creates a trailer for the resource.
|
|
390
|
+
|
|
391
|
+
:param name: A name for the new trailer.
|
|
392
|
+
:type name: :py:obj:`str`
|
|
393
|
+
:param code: A unique code for the new trailer.
|
|
394
|
+
:type code: :py:obj:`str`
|
|
395
|
+
:param desc: A description for the trailer.
|
|
396
|
+
:type desc: :py:obj:`str`
|
|
397
|
+
:param phone: A phone number beginning in a country code. No spaces.
|
|
398
|
+
:type phone: :py:obj:`str`
|
|
399
|
+
:param custom_fields: Additional custom fields to add to the trailer.
|
|
400
|
+
:type custom_fields: :py:obj:`dict` | :py:obj:`None`
|
|
401
|
+
:raises WialonError: If something goes wrong calling the Wialon API.
|
|
402
|
+
:returns: Nothing.
|
|
403
|
+
:rtype: :py:obj:`None`
|
|
404
|
+
|
|
405
|
+
"""
|
|
406
|
+
params = {
|
|
407
|
+
"itemId": self.id,
|
|
408
|
+
"id": 0,
|
|
409
|
+
"callMode": "create",
|
|
410
|
+
"c": code,
|
|
411
|
+
"ds": desc,
|
|
412
|
+
"n": name,
|
|
413
|
+
"f": 1,
|
|
414
|
+
}
|
|
415
|
+
if phone:
|
|
416
|
+
params.update({"p": quote_plus(phone)})
|
|
417
|
+
if custom_fields:
|
|
418
|
+
params.update({"jp": custom_fields})
|
|
419
|
+
self.session.wialon_api.resource_update_trailer(**params)
|
|
File without changes
|
{python_terminusgps-20.7.0.dist-info → python_terminusgps-21.0.0.dist-info}/licenses/COPYING
RENAMED
|
File without changes
|