PythonRMV/pyrmv/classes/Gis.py

11 lines
281 B
Python
Raw Permalink Normal View History

2022-09-23 23:58:45 +03:00
from isodate import parse_duration
class Gis():
2022-10-05 13:17:51 +03:00
"""Gis object."""
2022-09-24 12:40:18 +03:00
2022-09-23 23:58:45 +03:00
def __init__(self, ref: str, route: dict):
2022-09-24 13:08:32 +03:00
2022-09-23 23:58:45 +03:00
self.ref = ref
self.dist = route["dist"]
self.duration = parse_duration(route["durS"])
self.geo = route["dirGeo"]