mirror of
https://github.com/Remik1r3n/maimaiDX-Api.git
synced 2025-05-20 04:17:28 +08:00
19 lines
492 B
Python
19 lines
492 B
Python
# 获取用户简略预览数据的 API 实现,此 API 无需任何登录即可调取
|
||
|
||
import json
|
||
from API_TitleServer import apiSDGB
|
||
from Config import *
|
||
|
||
def apiGetUserPreview(userId) -> str:
|
||
data = json.dumps({
|
||
"userId": int(userId)
|
||
})
|
||
preview_result = apiSDGB(data, "GetUserPreviewApi", userId)
|
||
return preview_result
|
||
|
||
# CLI 示例
|
||
if __name__ == "__main__":
|
||
#userId = input("请输入用户 ID:")
|
||
userId = testUid
|
||
print(apiGetUserPreview(userId))
|