Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持文件分类相关 API #57

Closed
Harry-Chen opened this issue Apr 16, 2024 · 1 comment · Fixed by #58
Closed

支持文件分类相关 API #57

Harry-Chen opened this issue Apr 16, 2024 · 1 comment · Fixed by #58
Assignees

Comments

@Harry-Chen
Copy link
Owner

现有作业查询 API 返回结果如:

{
    "wlkcid": "[redacted]",
    "kjxxid": "[redacted]",
    "wz": 8,
    "sfqd": 0,
    "bt": "[redacted]",
    "kjflid": "INITWJ147572516",
    "wjlx": "pdf",
    "wjdx": 3278077,
    "fileSize": "3.0M",
    "scsj": "2024-04-10 08:14",
    "xsllcs": 11,
    "wjid": "[redacted]",
    "ms": "",
    "kjflwz": 0,
    "kjlbxszt": 1,
    "zrs": "40",
    "yllrs": "16",
    "id": "[redacted]"
}

其中的 kjflid 可来自 https://learn.tsinghua.edu.cn/b/wlxt/kj/wlkc_kjflb/teacher/pageList (学生 URL 应该不一样),形如:

{
    "wlkcid": "[redacted]",
    "kjflid": "INITWJ147572516",
    "lb": "",
    "bt": "电子教案",
    "wz": 0,
    "xszt": 1,
    "czr": "admin",
    "czsj": 1703546552000,
    "bz": "学期初始化",
    "id": "INITWJ147572516"
}

需要添加这些 API 支持,可以考虑是否单独增加 API,或者在获取文件时自动映射所有的分类到字符串。

@AsakuraMizu
Copy link
Collaborator

还注意到加了一个按分类获取文件列表的接口 https://learn.tsinghua.edu.cn/b/wlxt/kj/wlkc_kjxxb/student/kjxxb/[wlkcid]/[kjflid] 虽然返回格式看起来非常奇怪:

[
	"[kjxxid]",
	"[bt]",
	[重要性:0/1],
	"[kjflid]",
	"[wlkcid]",
	[简要说明/null],
	"[发布时间 fallback?]",
	"[wjid]",
	[isNew],
	[wjdx],
	"[发布时间]",
	"[是否收藏:是/否]",
	"[是否备注:是/否]",
	"[wjlx]",
	[备注内容/null]
]

感觉可能这个是新的文件列表接口,可以考虑用这个和文件分类的接口重新做一下文件的api

学生端课件分类的接口 https://learn.tsinghua.edu.cn/b/wlxt/kj/wlkc_kjflb/student/pageList 是基本一样的,但是教师端看起来貌似没有这个新的文件列表接口(手动拼接了一下直接 404 了),但是有其他可以按分类查的接口

@AsakuraMizu AsakuraMizu changed the title 支持作业分类相关 API 支持文件分类相关 API May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants