From b32c84e3db7b72fd51a37048df57c105922486dc Mon Sep 17 00:00:00 2001 From: Matthieu DUVAL Date: Wed, 24 May 2023 12:27:03 +0200 Subject: [PATCH] Migrate to new hosts for GeoRide --- georideapilib/api.py | 3 ++- georideapilib/socket.py | 4 ++-- setup.py | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/georideapilib/api.py b/georideapilib/api.py index b1bae2d..0096a85 100644 --- a/georideapilib/api.py +++ b/georideapilib/api.py @@ -22,7 +22,8 @@ from georideapilib.exception import ( UnauthorizedException ) -GEORIDE_API_HOST = "https://api.georide.fr" +GEORIDE_API_HOST = "https://api.georide.com" +GEORIDE_SOCKET_HOST = "https://socket.georide.com" GEORIDE_API_ENDPOINT_LOGIN = "/user/login" GEORIDE_API_ENDPOINT_NEW_TOKEN = "/user/new-token" GEORIDE_API_ENDPOINT_LOGOUT = "/user/logout" diff --git a/georideapilib/socket.py b/georideapilib/socket.py index e49e83b..5749b0d 100644 --- a/georideapilib/socket.py +++ b/georideapilib/socket.py @@ -2,7 +2,7 @@ import logging import socketio -from georideapilib.api import GEORIDE_API_HOST +from georideapilib.api import GEORIDE_SOCKET_HOST _LOGGER = logging.getLogger(__name__) @@ -104,7 +104,7 @@ class GeoRideSocket(): def connect(self, auth_token): """ connect to the georide socket""" if self._initialised is not False: - sio.connect(GEORIDE_API_HOST, headers={'token': auth_token}) + sio.connect(GEORIDE_SOCKET_HOST, headers={'token': auth_token}) sio.wait() else: _LOGGER.error("Please call init() before") diff --git a/setup.py b/setup.py index 831a2c5..8d265a9 100644 --- a/setup.py +++ b/setup.py @@ -19,16 +19,16 @@ CURRENT_DIR = os.path.dirname(__file__) setup( name='georideapilib', packages=['georideapilib', 'georideapilib.objects'], # this must be the same as the name above - version='0.9.6', + version='1.0.0', description='Lib to control GeoRide tracker devices with theire rest api', author='Matthieu DUVAL', author_email='georideapilib@duval-dev.fr', # use the URL to the github repo url='https://github.com/hacf/georide-api', - download_url='https://codeload.github.com/hacf/georide-api/tar.gz/0.9.3', + download_url='https://codeload.github.com/hacf/georide-api/tar.gz/1.0.0', keywords=['rest', 'georide', 'api', 'grutier', 'GeoRide'], # arbitrary keywords classifiers=[], - install_requires=["python-socketio[client]==4.6.1"], + install_requires=["python-socketio[client]==5.8.0"], tests_require=[ 'pytest>=3.7', 'pytest-pep8',