add GetUserNewItemListApi handler

This commit is contained in:
SoulGateKey
2025-04-02 03:07:35 +08:00
parent 1d545b2bd2
commit fa94c029ca
2 changed files with 39 additions and 3 deletions

View File

@@ -31,6 +31,7 @@ from .festival import Mai2Festival
from .festivalplus import Mai2FestivalPlus
from .buddies import Mai2Buddies
from .buddiesplus import Mai2BuddiesPlus
from .prism import Mai2Prism
class Mai2Servlet(BaseServlet):
@@ -66,7 +67,8 @@ class Mai2Servlet(BaseServlet):
Mai2Festival,
Mai2FestivalPlus,
Mai2Buddies,
Mai2BuddiesPlus
Mai2BuddiesPlus,
Mai2Prism
]
self.logger = logging.getLogger("mai2")
@@ -306,8 +308,11 @@ class Mai2Servlet(BaseServlet):
internal_ver = Mai2Constants.VER_MAIMAI_DX_FESTIVAL_PLUS
elif version >= 140 and version < 145: # BUDDiES
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES
elif version >= 145: # BUDDiES PLUS
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS
elif version >= 145 and version <150: # BUDDiES PLUS
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS,
elif version >=150:
internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM
elif game_code == "SDGA": # Int
if version < 105: # 1.0
internal_ver = Mai2Constants.VER_MAIMAI_DX
@@ -325,6 +330,12 @@ class Mai2Servlet(BaseServlet):
internal_ver = Mai2Constants.VER_MAIMAI_DX_FESTIVAL
elif version >= 135 and version < 140: # FESTiVAL PLUS
internal_ver = Mai2Constants.VER_MAIMAI_DX_FESTIVAL_PLUS
elif version >= 140 and version < 145: # BUDDiES
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES
elif version >= 145 and version <150: # BUDDiES PLUS
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS,
elif version >=150:
internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM
if all(c in string.hexdigits for c in endpoint) and len(endpoint) == 32:
# If we get a 32 character long hex string, it's a hash and we're