46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
from abc import ABC, abstractmethod
|
|
|
|
|
|
class BaseProviderAdapter(ABC):
|
|
namespace: str
|
|
|
|
@abstractmethod
|
|
def search_players(self, *, query: str = "", limit: int = 50, offset: int = 0) -> list[dict]:
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def fetch_player(self, *, external_player_id: str) -> dict | None:
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def fetch_players(self) -> list[dict]:
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def fetch_competitions(self) -> list[dict]:
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def fetch_teams(self) -> list[dict]:
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def fetch_seasons(self) -> list[dict]:
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def fetch_player_stats(self) -> list[dict]:
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def fetch_player_careers(self) -> list[dict]:
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def sync_all(self) -> dict:
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def sync_incremental(self, *, cursor: str | None = None) -> dict:
|
|
raise NotImplementedError
|