13 upvotes, 2 direct replies (showing 2)
View submission: Announcing Mod Notes
Certainly possible! To understand the use case, would this be for retrieving all notes in a subreddit to populate in toolbox?
Comment by creesch at 07/03/2022 at 19:07 UTC
20 upvotes, 2 direct replies
That and to also allow third party tools in general to respect the API rate-limit better.
Imagine that if a busy comment section is loaded on a subreddit someone mods. The way the API is set up now, we basically have to hit the get endpoint for each individual user. Then if the page is reloaded we either need to have everything cached and only hit the API for users we haven't checked before (and eventually hit the api again for all users anyway) or simply check all users again. Frankly, I am not sure we can actually reasonably implement modnotes in toolbox and fully respect the API rate limits.
If we had a list of users with known notes we could simply first check all users on page against that list and only fetch the notes for those users that have them. We are basically talking about hundreds or possibly thousands of API requests versus a handful.
Comment by KKingler at 07/03/2022 at 23:15 UTC
1 upvotes, 0 direct replies
Fetching a batch of 100 users sounds the best as it's already that way in some other API requests.