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