Initial restarted commit
This commit is contained in:
16
GetPreview.py
Normal file
16
GetPreview.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# 获取用户简略预览数据的 API 实现,此 API 无需任何登录即可调取
|
||||
|
||||
import json
|
||||
from API_TitleServer import apiSDGB
|
||||
|
||||
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:")
|
||||
print(apiGetUserPreview(userId))
|
||||
Reference in New Issue
Block a user