From 626f33097bfe4064cbf3e943de93132aeba78210 Mon Sep 17 00:00:00 2001 From: mokurin000 <1348292515a@gmail.com> Date: Thu, 31 Jul 2025 21:55:23 +0800 Subject: [PATCH] chore: add get b50 --- GetRating.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 GetRating.py diff --git a/GetRating.py b/GetRating.py new file mode 100644 index 0000000..7893049 --- /dev/null +++ b/GetRating.py @@ -0,0 +1,18 @@ +# 获取用户简略预览数据的 API 实现,此 API 无需任何登录即可调取 + +import rapidjson as json +from API_TitleServer import apiSDGB + + +def apiGetUserPreview(userId, noLog: bool = False) -> str: + data = json.dumps({"userId": int(userId)}) + preview_result = apiSDGB(data, "GetUserRatingApi", userId, noLog) + return preview_result + + +# CLI 示例 +if __name__ == "__main__": + userId = input("请输入用户 ID:") + # userId = testUid8 + print(apiGetUserPreview(userId)) + print(apiSDGB("{}", "Ping", userId, False))