refactor: Refactor the service of retrieval the recommend app (#9302)

This commit is contained in:
zhuhao 2024-10-14 13:26:21 +08:00 • committed by GitHub
commit 7a405b86c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 302 additions and 226 deletions

View file

@ -0,0 +1,17 @@
from abc import ABC, abstractmethod
class RecommendAppRetrievalBase(ABC):
"""Interface for recommend app retrieval."""
@abstractmethod
def get_recommended_apps_and_categories(self, language: str) -> dict:
raise NotImplementedError
@abstractmethod
def get_recommend_app_detail(self, app_id: str):
raise NotImplementedError
@abstractmethod
def get_type(self) -> str:
raise NotImplementedError