coralproject / talk

A better commenting experience from Vox Media
https://coralproject.net
Other
1.89k stars 355 forks source link

How to get Most commented list #4658

Closed vignesh-10940 closed 1 week ago

vignesh-10940 commented 2 weeks ago

How to get most commented stories..?

losowsky commented 1 week ago

Hi there

Can you give a little more information about what you're trying to do? Some of the things you might be trying to do:

Each of these has very different answers. Thanks!

vignesh-10940 commented 1 week ago

We have an idea to show most commented stories for past x days to display in our site.

tessalt commented 1 week ago

We have a JSONP endpoint available that will return the top most active stories over 24h

https://{{ CORAL_DOMAIN }}/api/story/active.js?callback={{ CALLBACK_NAME }}&siteID={{ SITE_ID }}

CORAL_DOMAIN - domain name for the Coral instance CALLBACK_NAME - name of the function on window (for example, if you have window.activeStories = function() { /**/ }, you would set it to activeStories) SITE_ID - Coral Site ID for the site that you want a listing of the active stories on that site

losowsky commented 1 week ago

Just to add that this isn't customizable for X days, so if you want that feature, you're welcome to submit it as a contribution: https://github.com/coralproject/talk/blob/develop/CONTRIBUTING.md Thank you!