كيفية الحصول على عدد ردود دقيق عبر واجهة برمجة التطبيقات؟

سحبت المواضيع من فئة محددة في منتداي. لكل موضوع عداد للردود، لكنه غالبًا لا يبدو له أي علاقة بالردود التي يراها المستخدمون فعليًا.

على سبيل المثال، هذا الموضوع: Error 404 after installing a SSL certificate - Site Operations Help - Open edX discussions يحتوي على رد واحد. لكن ملف JSON (https://discuss.openedx.org/posts/1578.json) يُظهر أن عداد الردود يساوي 0. لماذا؟ وكيف يمكنني الحصول على عداد ردود دقيق؟

The reply_count parameter on a post gives you the number of direct replies to the post. A reply to a post is created by clicking the “Reply” button that is directly under the post. Replies to the topic’s original post are an exception to this. If a post is created by clicking the Reply button directly under the topic’s first post, it will not increment the OPs reply count.

The reply_count on a topic is the total number of direct replies to posts in that topic. It is not the total number of posts in the topic.

For finding the total number of comments in a topic, look at the topic’s posts_count value. The total number of comments in the topic will be posts_count - 1. You can see that if you go to https://discuss.openedx.org/t/error-404-after-installing-a-ssl-certificate/1578.json.

5 إعجابات

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.