21 lines
561 B
Python
21 lines
561 B
Python
import asyncio
|
|
import logging
|
|
|
|
from aiohttp import ClientResponse
|
|
|
|
from resa_padel import config
|
|
from resa_padel.gestion_sports_connector import GestionSportsConnector
|
|
|
|
LOGGER = logging.getLogger(__name__)
|
|
|
|
|
|
async def connect(url: str) -> ClientResponse:
|
|
booking_platform = GestionSportsConnector(url)
|
|
return await booking_platform.connect()
|
|
|
|
|
|
def main() -> ClientResponse:
|
|
LOGGER.info("Starting booking padel court")
|
|
response = asyncio.run(connect(config.GESTION_SPORTS_URL))
|
|
LOGGER.info("Finished booking padel court")
|
|
return response
|