Move wacca from megaime develop branch, should at least partially fix #3 #4 and #5

This commit is contained in:
Hay1tsme
2023-02-22 22:22:03 -05:00
parent 026fcc5182
commit c3aac4c38e
13 changed files with 309 additions and 341 deletions

View File

@@ -1,6 +1,6 @@
from typing import List, Dict
from titles.wacca.handlers.base import BaseResponse
from titles.wacca.handlers.base import BaseResponse, BaseRequest
from titles.wacca.handlers.helpers import Notice
# ---advertise/GetNews---
@@ -33,13 +33,33 @@ class GetNewsResponseV1(BaseResponse):
class GetNewsResponseV2(GetNewsResponseV1):
stoppedProducts: list[int] = []
def make(self) -> Dict:
super().make()
self.params.append(self.stoppedProducts)
return super(GetNewsResponseV1, self).make()
class GetNewsResponseV3(GetNewsResponseV2):
stoppedNavs: list[int] = []
stoppedNavVoices: list[int] = []
def make(self) -> Dict:
super().make()
self.params.append(self.stoppedProducts)
self.params.append(self.stoppedNavs)
self.params.append(self.stoppedNavVoices)
return super(GetNewsResponseV1, self).make()
# ---advertise/GetRanking---
class AdvertiseGetRankingRequest(BaseRequest):
def __init__(self, data: Dict) -> None:
super().__init__(data)
self.resourceVer: int = self.params[0]
class AdvertiseGetRankingResponse(BaseResponse):
def __init__(self) -> None:
super().__init__()
def make(self) -> Dict:
return super().make()