واجهة برمجة تطبيقات مسح عدد المنشورات غير المقروءة

مرحبًا بالفريق،

هل توجد أي واجهة برمجية (API) لمسح عدد الرسائل غير المقروءة للمواضيع التي تم الرد عليها؟

لقد قمت بالهندسة العكسية واستدعيت الواجهات البرمجية التالية:

http://192.168.131.180/t/{topic_id}/{posts_count}.json?track_visit=true&forceLoad=true&_={timestamp}&api_key={user_api_key}

و

http://192.168.131.180/topics/timings

ولكنها لا تعمل.

See How to reverse engineer the Discourse API

I have done reverse engineering and called api

http://192.168.131.180/t/{topic_id}/{posts_count}.json?track_visit=true&forceLoad=true&_={timestamp}&api_key={user_api_key}

and

http://192.168.131.180/topics/timings

but it’s not working.

I looked through code and second request should have done the trick. I tried and I was successful in clearing the count. Attaching screenshot of my request which got a 200 OK status and cleared count.

Screenshot%20from%202019-01-14%2015-12-07

Timings[6] should be timings[posts_count]. You can add just one timings[posts_count] and clearing should work. I think other timings[posts_count - x] are for tracking purpose.

Have a try and let me know if you have any questions.

Thanks

3 إعجابات