Cleanup: MB 2.0 Gap Analysis előtti állapot (adatok kizárva)

This commit is contained in:
2026-02-23 09:44:02 +01:00
parent 5757754aae
commit 893f39fa15
74 changed files with 34239 additions and 2834 deletions

View File

@@ -0,0 +1,27 @@
import httpx
import logging
logger = logging.getLogger("DVLA-Service")
class DVLAService:
API_URL = "https://driver-vehicle-licensing.api.gov.uk/vehicle-enquiry/v1/vehicles"
API_KEY = "IDE_MÁSOLD_BE_AZ_API_KULCSOT"
@classmethod
async def get_vehicle_details(cls, vrm: str):
"""VRM az angol rendszám (pl. AB12 CDE)"""
headers = {
"x-api-key": cls.API_KEY,
"Content-Type": "application/json"
}
payload = {"registrationNumber": vrm}
async with httpx.AsyncClient() as client:
try:
response = await client.post(cls.API_URL, json=payload, headers=headers)
if response.status_code == 200:
return response.json()
return None
except Exception as e:
logger.error(f"❌ DVLA hiba: {e}")
return None