トピックが受け取ったコメント数(および最初の投稿またはすべての投稿を合わせた「いいね」の数)を API で取得する最も効率的な方法はどのようなものでしょうか?
(確認はしていませんが、返信数などを格納するカウンターキャッシュが存在すると思われます。トピック全体を読み込むのではなく、API を通じてその情報を取得することは可能でしょうか?)
トピックが受け取ったコメント数(および最初の投稿またはすべての投稿を合わせた「いいね」の数)を API で取得する最も効率的な方法はどのようなものでしょうか?
(確認はしていませんが、返信数などを格納するカウンターキャッシュが存在すると思われます。トピック全体を読み込むのではなく、API を通じてその情報を取得することは可能でしょうか?)
If you fetch a topic via the api like:
http://localhost:3000/t/welcome-to-discourse/8.json
It will return lots of things, but 2 of the values are:
posts_count: 214
like_count: 2
posts_count is the total number of posts the topic has. like_count is the total number of likes across all posts on the topic.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.