팝업 외에 수정 이력을 확인하거나 접근할 수 있는 방법이 있을까요?
예를 들어, 우리는 Discourse API를 호출하여 특정 주제의 HTML을 가져와我们的产品에 표시하는 코드를 구축했습니다. 특정 수정 버전 의 HTML 콘텐츠를 가져오는 비슷한 작업을 수행할 수 있을까요? 추가로, 어떤 수정 버전을 사용할지 결정하기 위해 데이터를/내용을 확인할 수 있는 방법도 필요합니다.
사용할 수 있는 엔드포인트는 다음과 같습니다:
/posts/<post_id>/revisions/latest.json
/posts/<post_id>/revisions/<revision_id>.json
도움이 되셨길 바랍니다!
사용된 API를 파악하는 데 도움이 될 수 있는 가이드도 유용할 수 있습니다:
Discourse is backed by a complete JSON api. Anything you can do on the site you can also do using the JSON api.
The API is documented at docs.discourse.org . You can also use the discourse_api Ruby gem as a client library. However, not every endpoint is documented.
To determine how to do something with the JSON API here are some steps you can follow.
Example: recategorize a topic.
Go to a topic and start editing a category:
[image]
Open Chrome dev tools, switch to the Network tab, select …