forked from Fragrance/eaquira
chore: move payload scripts to action/
This commit is contained in:
30
action/GetUserPreviewApi.py
Normal file
30
action/GetUserPreviewApi.py
Normal file
@@ -0,0 +1,30 @@
|
||||
import asyncio
|
||||
|
||||
import httpx
|
||||
|
||||
from sdgb import MaimaiClient
|
||||
from sdgb.chime import qr_api
|
||||
from sdgb.settings import clientId, qrCode
|
||||
|
||||
maimai = MaimaiClient()
|
||||
|
||||
qrResp = qr_api(qrCode)
|
||||
userId = qrResp["userID"]
|
||||
token = qrResp["token"]
|
||||
|
||||
|
||||
async def run_workflow(maimai: MaimaiClient):
|
||||
async with httpx.AsyncClient(verify=False) as client:
|
||||
data = {
|
||||
"userId": userId,
|
||||
"segaIdAuthKey": "",
|
||||
"token": token,
|
||||
"clientId": clientId,
|
||||
}
|
||||
result = await maimai.call_api(client, "GetUserPreviewApi", data, userId)
|
||||
print(result)
|
||||
|
||||
|
||||
# 执行入口
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(run_workflow(maimai))
|
||||
Reference in New Issue
Block a user