Compare commits
3 Commits
859d962cae
...
6f02f0b925
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f02f0b925 | |||
| a05b5bdaa6 | |||
| 3053f2db69 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ __pycache__
|
|||||||
**/__pycache__
|
**/__pycache__
|
||||||
dist/
|
dist/
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
|
build/
|
||||||
@@ -219,7 +219,8 @@ class GeoRideTracker: # pylint: disable=R0904,R0902
|
|||||||
longitude, altitude, locked_position_id, locked_latitude, locked_longitude,
|
longitude, altitude, locked_position_id, locked_latitude, locked_longitude,
|
||||||
is_locked, can_see_position, can_lock, can_unlock, can_share, can_unshare,
|
is_locked, can_see_position, can_lock, can_unlock, can_share, can_unshare,
|
||||||
can_check_speed, can_see_statistics, can_send_broken_down_signal,
|
can_check_speed, can_see_statistics, can_send_broken_down_signal,
|
||||||
can_send_stolen_signal, status):
|
can_send_stolen_signal, status, subscription_id, external_battery_voltage,
|
||||||
|
internal_battery_voltage, timezone, is_second_gen, is_up_to_date):
|
||||||
self._tracker_id = tracker_id
|
self._tracker_id = tracker_id
|
||||||
self._tracker_name = tracker_name
|
self._tracker_name = tracker_name
|
||||||
self._device_button_action = device_button_action
|
self._device_button_action = device_button_action
|
||||||
@@ -235,7 +236,6 @@ class GeoRideTracker: # pylint: disable=R0904,R0902
|
|||||||
self._locked_latitude = locked_latitude
|
self._locked_latitude = locked_latitude
|
||||||
self._locked_longitude = locked_longitude
|
self._locked_longitude = locked_longitude
|
||||||
self._role = role
|
self._role = role
|
||||||
self._subscription_id = subscription_id
|
|
||||||
self._last_payment_date = last_payment_date
|
self._last_payment_date = last_payment_date
|
||||||
self._gift_card_id = gift_card_id
|
self._gift_card_id = gift_card_id
|
||||||
self._expires = expires
|
self._expires = expires
|
||||||
@@ -258,7 +258,12 @@ class GeoRideTracker: # pylint: disable=R0904,R0902
|
|||||||
self._can_send_stolen_signal = can_send_stolen_signal
|
self._can_send_stolen_signal = can_send_stolen_signal
|
||||||
self._status = status
|
self._status = status
|
||||||
self._auto_lock_freezed_to = auto_lock_freezed_to
|
self._auto_lock_freezed_to = auto_lock_freezed_to
|
||||||
|
self._subscription_id = subscription_id
|
||||||
|
self._external_battery_voltage = external_battery_voltage
|
||||||
|
self._internal_battery_voltage = internal_battery_voltage
|
||||||
|
self._timezone = timezone
|
||||||
|
self._is_second_gen = is_second_gen
|
||||||
|
self._is_up_to_date = is_up_to_date
|
||||||
@property
|
@property
|
||||||
def tracker_id(self):
|
def tracker_id(self):
|
||||||
""" tracker_id """
|
""" tracker_id """
|
||||||
@@ -499,6 +504,37 @@ class GeoRideTracker: # pylint: disable=R0904,R0902
|
|||||||
""" status """
|
""" status """
|
||||||
self._status = status
|
self._status = status
|
||||||
|
|
||||||
|
@property
|
||||||
|
def subscription_id(self):
|
||||||
|
"""subscription_id property"""
|
||||||
|
return self._subscription_id
|
||||||
|
|
||||||
|
@property
|
||||||
|
def external_battery_voltage(self):
|
||||||
|
"""_external_battery_voltage property"""
|
||||||
|
return self._external_battery_voltage
|
||||||
|
|
||||||
|
@property
|
||||||
|
def internal_battery_voltage(self):
|
||||||
|
"""internal_battery_voltage property"""
|
||||||
|
return self._internal_battery_voltage
|
||||||
|
|
||||||
|
@property
|
||||||
|
def timezone(self):
|
||||||
|
"""timezone property"""
|
||||||
|
return self._timezone
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_second_gen(self):
|
||||||
|
"""is_second_gen property"""
|
||||||
|
return self._is_second_gen
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_up_to_date(self):
|
||||||
|
"""is_up_to_date property"""
|
||||||
|
return self._is_up_to_date
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_json(json):
|
def from_json(json):
|
||||||
"""return new object fromjson"""
|
"""return new object fromjson"""
|
||||||
@@ -539,7 +575,13 @@ class GeoRideTracker: # pylint: disable=R0904,R0902
|
|||||||
json['canSeeStatistics'],
|
json['canSeeStatistics'],
|
||||||
json['canSendBrokenDownSignal'],
|
json['canSendBrokenDownSignal'],
|
||||||
json['canSendStolenSignal'],
|
json['canSendStolenSignal'],
|
||||||
json['status']
|
json['status'],
|
||||||
|
None if json['subscriptionId'] == "None" else json['subscriptionId'],
|
||||||
|
None if json['externalBatteryVoltage'] == "None" else json['externalBatteryVoltage'],
|
||||||
|
None if json['internalBatteryVoltage'] == "None" else json['internalBatteryVoltage'],
|
||||||
|
json['timezone'],
|
||||||
|
json['isSecondGen'],
|
||||||
|
json['isUpToDate']
|
||||||
)
|
)
|
||||||
|
|
||||||
def update_all_data(self, tracker):
|
def update_all_data(self, tracker):
|
||||||
@@ -558,7 +600,6 @@ class GeoRideTracker: # pylint: disable=R0904,R0902
|
|||||||
self._locked_latitude = tracker.locked_latitude
|
self._locked_latitude = tracker.locked_latitude
|
||||||
self._locked_longitude = tracker.locked_longitude
|
self._locked_longitude = tracker.locked_longitude
|
||||||
self._role = tracker.role
|
self._role = tracker.role
|
||||||
self._subscription_id = tracker.subscription_id
|
|
||||||
self._last_payment_date = tracker.last_payment_date
|
self._last_payment_date = tracker.last_payment_date
|
||||||
self._gift_card_id = tracker.gift_card_id
|
self._gift_card_id = tracker.gift_card_id
|
||||||
self._expires = tracker.expires
|
self._expires = tracker.expires
|
||||||
@@ -581,6 +622,12 @@ class GeoRideTracker: # pylint: disable=R0904,R0902
|
|||||||
self._can_send_stolen_signal = tracker.can_send_stolen_signal
|
self._can_send_stolen_signal = tracker.can_send_stolen_signal
|
||||||
self._status = tracker.status
|
self._status = tracker.status
|
||||||
self._auto_lock_freezed_to = tracker.auto_lock_freezed_to
|
self._auto_lock_freezed_to = tracker.auto_lock_freezed_to
|
||||||
|
self._subscription_id = tracker.subscription_id
|
||||||
|
self._external_battery_voltage = tracker.external_battery_voltage
|
||||||
|
self._internal_battery_voltage = tracker.internal_battery_voltage
|
||||||
|
self._timezone = tracker.timezone
|
||||||
|
self._is_second_gen = tracker.is_second_gen
|
||||||
|
self._is_up_to_date = tracker.is_up_to_date
|
||||||
|
|
||||||
class GeoRideAccount:
|
class GeoRideAccount:
|
||||||
""" Account object representation """
|
""" Account object representation """
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
description-file = README.md
|
description_file = README.md
|
||||||
6
setup.py
6
setup.py
@@ -19,16 +19,16 @@ CURRENT_DIR = os.path.dirname(__file__)
|
|||||||
setup(
|
setup(
|
||||||
name='georideapilib',
|
name='georideapilib',
|
||||||
packages=['georideapilib'], # this must be the same as the name above
|
packages=['georideapilib'], # this must be the same as the name above
|
||||||
version='0.5.0',
|
version='0.6.1',
|
||||||
description='Lib to control GeoRide tracker devices with their rest api',
|
description='Lib to control GeoRide tracker devices with their rest api',
|
||||||
author='Matthieu DUVAL',
|
author='Matthieu DUVAL',
|
||||||
author_email='georideapilib@duval-dev.fr',
|
author_email='georideapilib@duval-dev.fr',
|
||||||
# use the URL to the github repo
|
# use the URL to the github repo
|
||||||
url='https://github.com/hacf/georide-api',
|
url='https://github.com/hacf/georide-api',
|
||||||
download_url='https://codeload.github.com/hacf/georide-api/tar.gz/0.5.0',
|
download_url='https://codeload.github.com/hacf/georide-api/tar.gz/0.6.0',
|
||||||
keywords=['rest', 'georide', 'api', 'grutier', 'GeoRide'], # arbitrary keywords
|
keywords=['rest', 'georide', 'api', 'grutier', 'GeoRide'], # arbitrary keywords
|
||||||
classifiers=[],
|
classifiers=[],
|
||||||
install_requires=["python-socketio[client]"],
|
install_requires=["python-socketio[client]==4.6.1"],
|
||||||
tests_require=[
|
tests_require=[
|
||||||
'pytest>=3.7',
|
'pytest>=3.7',
|
||||||
'pytest-pep8',
|
'pytest-pep8',
|
||||||
|
|||||||
Reference in New Issue
Block a user