StarRailDamageCal/test.py

17 lines
421 B
Python
Raw Normal View History

2023-10-30 10:01:42 +00:00
import json
2023-11-09 02:06:46 +00:00
from typing import List, Union
2023-10-30 10:01:42 +00:00
from starrail_damage_cal.cal_damage import DamageCal
2023-10-31 02:17:24 +00:00
async def test_get_damage_data_by_uid() -> None:
2024-03-19 13:10:09 +00:00
data = await DamageCal.get_all_damage_data_by_uid(uid="100895938")
2023-11-09 02:06:46 +00:00
if isinstance(data, Union[List, dict]):
2023-10-30 10:01:42 +00:00
print(json.dumps(data, ensure_ascii=False, indent=4))
if __name__ == "__main__":
import asyncio
asyncio.run(test_get_damage_data_by_uid())