You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
728 B
33 lines
728 B
2 years ago
|
"""
|
||
|
Georide objects implementation
|
||
|
@author Matthieu DUVAL <matthieu@duval-dev.fr>
|
||
|
"""
|
||
|
import time
|
||
|
import logging
|
||
|
|
||
|
|
||
|
_LOGGER = logging.getLogger(__name__)
|
||
|
|
||
|
class GeoRideSharedTrip:
|
||
|
""" Shared trip object representation """
|
||
|
def __init__(self, url, shareId):
|
||
|
self._url = url
|
||
|
self._share_id = shareId
|
||
|
|
||
|
@property
|
||
|
def url(self):
|
||
|
""" shared trip url """
|
||
|
return self._url
|
||
|
|
||
|
@property
|
||
|
def share_id(self):
|
||
|
""" shared trip id """
|
||
|
return self._share_id
|
||
|
|
||
|
@staticmethod
|
||
|
def from_json(json):
|
||
|
"""return new object fromjson"""
|
||
|
return GeoRideSharedTrip(
|
||
|
json['url'],
|
||
|
json['shareId']
|
||
|
)
|