mirror of
https://github.com/PaiGramTeam/SIMNet.git
synced 2024-11-16 03:55:28 +00:00
🐛 fix starrail wish model
This commit is contained in:
parent
7671198c0c
commit
842ad515cd
@ -1,7 +1,7 @@
|
||||
import logging
|
||||
import uuid
|
||||
from types import TracebackType
|
||||
from typing import AsyncContextManager, Type, Optional, Any
|
||||
from typing import AsyncContextManager, Type, Optional, Any, Union
|
||||
|
||||
from httpx import AsyncClient, TimeoutException, Response, HTTPError, Timeout
|
||||
|
||||
@ -53,7 +53,7 @@ class BaseClient(AsyncContextManager["BaseClient"]):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
cookies: Optional[str, CookieTypes] = None,
|
||||
cookies: Optional[Union[str, CookieTypes]] = None,
|
||||
headers: Optional[HeaderTypes] = None,
|
||||
account_id: Optional[int] = None,
|
||||
player_id: Optional[int] = None,
|
||||
|
@ -102,7 +102,7 @@ class BaseWishClient(BaseClient):
|
||||
game=game,
|
||||
lang=lang,
|
||||
authkey=authkey,
|
||||
params=dict(gacha_type=banner_type, size=size, end_id=end_id, game_biz=Game.value),
|
||||
params=dict(gacha_type=banner_type, size=size, end_id=end_id, game_biz=game.value),
|
||||
)
|
||||
|
||||
async def get_banner_names(
|
||||
|
@ -35,6 +35,9 @@ class StarRailWish(APIModel):
|
||||
type: str = Field(alias="item_type")
|
||||
"""Type of the wished item."""
|
||||
|
||||
item_id: int = Field(alias="item_id")
|
||||
"""ID of the wished item."""
|
||||
|
||||
name: str
|
||||
"""Name of the wished item."""
|
||||
|
||||
@ -44,6 +47,9 @@ class StarRailWish(APIModel):
|
||||
time: datetime
|
||||
"""Time when the wish was made."""
|
||||
|
||||
banner_id: int = Field(alias="gacha_id")
|
||||
"""ID of the banner the wish was made on."""
|
||||
|
||||
banner_type: StarRailBannerType = Field(alias="gacha_type")
|
||||
"""Type of the banner the wish was made on."""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user