2023-02-17 07:02:21 +01:00
|
|
|
from typing import List, Dict
|
|
|
|
|
2023-02-23 04:22:03 +01:00
|
|
|
from titles.wacca.handlers.base import BaseResponse, BaseRequest
|
2023-02-17 07:02:21 +01:00
|
|
|
from titles.wacca.handlers.helpers import Notice
|
|
|
|
|
2023-03-09 17:38:58 +01:00
|
|
|
|
2023-02-17 07:02:21 +01:00
|
|
|
# ---advertise/GetNews---
|
|
|
|
class GetNewsResponseV1(BaseResponse):
|
|
|
|
def __init__(self) -> None:
|
|
|
|
super().__init__()
|
2023-07-05 16:47:43 +02:00
|
|
|
self.notices: List[Notice] = []
|
|
|
|
self.copywrightListings: List[str] = []
|
|
|
|
self.stoppedSongs: List[int] = []
|
|
|
|
self.stoppedJackets: List[int] = []
|
|
|
|
self.stoppedMovies: List[int] = []
|
|
|
|
self.stoppedIcons: List[int] = []
|
2023-02-17 07:02:21 +01:00
|
|
|
|
|
|
|
def make(self) -> Dict:
|
|
|
|
note = []
|
|
|
|
|
|
|
|
for notice in self.notices:
|
|
|
|
note.append(notice.make())
|
2023-03-09 17:38:58 +01:00
|
|
|
|
|
|
|
self.params = [
|
|
|
|
note,
|
|
|
|
self.copywrightListings,
|
|
|
|
self.stoppedSongs,
|
|
|
|
self.stoppedJackets,
|
|
|
|
self.stoppedMovies,
|
|
|
|
self.stoppedIcons,
|
2023-02-17 07:02:21 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
return super().make()
|
|
|
|
|
2023-03-09 17:38:58 +01:00
|
|
|
|
|
|
|
class GetNewsResponseV2(GetNewsResponseV1):
|
2023-07-05 16:47:43 +02:00
|
|
|
stoppedProducts: List[int] = []
|
2023-02-23 04:22:03 +01:00
|
|
|
|
|
|
|
def make(self) -> Dict:
|
|
|
|
super().make()
|
|
|
|
self.params.append(self.stoppedProducts)
|
2023-03-09 17:38:58 +01:00
|
|
|
|
2023-02-23 04:22:03 +01:00
|
|
|
return super(GetNewsResponseV1, self).make()
|
|
|
|
|
2023-03-09 17:38:58 +01:00
|
|
|
|
2023-02-23 04:22:03 +01:00
|
|
|
class GetNewsResponseV3(GetNewsResponseV2):
|
2023-07-05 16:47:43 +02:00
|
|
|
stoppedNavs: List[int] = []
|
|
|
|
stoppedNavVoices: List[int] = []
|
2023-02-17 07:02:21 +01:00
|
|
|
|
|
|
|
def make(self) -> Dict:
|
|
|
|
super().make()
|
|
|
|
self.params.append(self.stoppedNavs)
|
|
|
|
self.params.append(self.stoppedNavVoices)
|
2023-03-09 17:38:58 +01:00
|
|
|
|
2023-02-17 07:02:21 +01:00
|
|
|
return super(GetNewsResponseV1, self).make()
|
2023-02-23 04:22:03 +01:00
|
|
|
|
2023-03-09 17:38:58 +01:00
|
|
|
|
2023-02-23 04:22:03 +01:00
|
|
|
# ---advertise/GetRanking---
|
|
|
|
class AdvertiseGetRankingRequest(BaseRequest):
|
|
|
|
def __init__(self, data: Dict) -> None:
|
|
|
|
super().__init__(data)
|
|
|
|
self.resourceVer: int = self.params[0]
|
|
|
|
|
2023-03-09 17:38:58 +01:00
|
|
|
|
2023-02-23 04:22:03 +01:00
|
|
|
class AdvertiseGetRankingResponse(BaseResponse):
|
|
|
|
def __init__(self) -> None:
|
|
|
|
super().__init__()
|
2023-03-09 17:38:58 +01:00
|
|
|
|
2023-02-23 04:22:03 +01:00
|
|
|
def make(self) -> Dict:
|
2023-03-09 17:38:58 +01:00
|
|
|
return super().make()
|