feat: implement backend API clients for multi-marketplace integration and frontend service layer
This commit is contained in:
15
backend/avito_api/services/items.py
Normal file
15
backend/avito_api/services/items.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from typing import Dict, Any, Optional
|
||||
from ..client import AvitoClient
|
||||
|
||||
class ItemsService:
|
||||
"""Service to handle Avito Items (Listings)."""
|
||||
|
||||
def __init__(self, client: AvitoClient):
|
||||
self.client = client
|
||||
|
||||
def get_info(self, item_id: str) -> Dict[str, Any]:
|
||||
"""
|
||||
Get info about a specific item.
|
||||
Endpoint: /core/v1/items/{item_id}
|
||||
"""
|
||||
return self.client.get(f"/core/v1/items/{item_id}")
|
||||
Reference in New Issue
Block a user