我正在通过 API 从我的 Moodle 站点中提取课程列表,但响应中没有图像 url 或图像名称。有没有办法得到它?
也许我使用的特定端点是错误的,但我找不到另一个列出所有课程的端点(对于未登录的用户,所以所有可用的课程)
https://example.com/webservice/rest/server.php?wstoken=12312312312123&wsfunction=core_course_get_courses&moodlewsrestformat=json
示例响应:
{
"id": 1,
"shortname": "A course title",
"categoryid": 3,
"categorysortorder": 10001,
"fullname": "A full course name ",
"displayname": "Some course",
"idnumber": "",
"summary": "",
"summaryformat": 1,
"format": "topics",
"showgrades": 1,
"newsitems": 5,
"startdate": 1588716000,
"enddate": 0,
"numsections": 7,
"maxbytes": 0,
"showreports": 0,
"visible": 1,
"hiddensections": 0,
"groupmode": 0,
"groupmodeforce": 0,
"defaultgroupingid": 0,
"timecreated": 1588703577,
"timemodified": 1589199433,
"enablecompletion": 1,
"completionnotify": 0,
"lang": "",
"forcetheme": "",
"courseformatoptions": [
{
"name": "hiddensections",
"value": 0
},
{
"name": "coursedisplay",
"value": 0
}
]
},