你好!
我们在网站中开发了一个功能,用于查询托管的 Discourse 论坛并显示找到的主题信息。上周部署时一切正常,但本周末却出问题了。原来,查询返回的 topic 对象结构发生了很大变化。
根据开发期间的测试,以及最新的文档,预期的响应对象如下:latest docs
"topics": [
{
"id": 1099,
"title": "Build Error: ipykernel 4.8.2 for python 3.6.6 on Windows",
"fancy_title": "Build Error: ipykernel 4.8.2 for python 3.6.6 on Windows",
"slug": "build-error-ipykernel-4-8-2-for-python-3-6-6-on-windows",
"posts_count": 1,
"reply_count": 0,
"highest_post_number": 1,
"image_url": null,
"created_at": "2020-06-30T23:36:42.277Z",
"last_posted_at": "2020-06-30T23:36:42.357Z",
"bumped": true,
"bumped_at": "2020-06-30T23:36:42.357Z",
"archetype": "regular",
"unseen": false,
"pinned": false,
"unpinned": null,
"visible": true,
"closed": false,
"archived": false,
"bookmarked": null,
"liked": null,
"thumbnails": null,
"tags": [
"windows",
"builder"
],
"category_id": 1,
"has_accepted_answer": false
}
],
实际/当前的响应:
"topics": [
{
"id": 1494,
"fancy_title": "Build Error: python-magic 0.4.15 for Python 3.8.2 on Mac",
"slug": "build-error-python-magic-0-4-15-for-python-3-8-2-on-mac",
"posts_count": 1,
"archetype": "regular",
"pinned": false,
"unpinned": null,
"visible": true,
"closed": false,
"archived": false,
"bookmarked": null,
"liked": null,
"tags": [
"mac",
"builder"
],
"category_id": 1,
"has_accepted_answer": false
}
],
我在想,是否是因为发布了某个更新,导致搜索 API 的响应发生了变化?或者更有可能的是,是否有管理员设置会导致这种情况?
我查看了最近一次更新(2.5 版本于 6 月 24 日发布)的变更日志,但没有发现任何明确提及 API 变更的内容。
提前感谢任何帮助。
- Carey