The API Throttling Documentation shows how to throttle requests on routes and the specific example given shows how to do so on the Post Model:
if (Post::where('user_id', $actor->id)->where('created_at', '>=', new DateTime('-10 seconds'))->exists()) {
return true;
}
How can i limit requests on a custom endpoint that doesn't add data; but rather simply pulls a discussion column value on request? Since it doesn't have a reference point like the created_at
above, how shall i decide the throttling condition? Looking for ideas...
My second question is regarding the FoF Byōbu extension. Firstly, thank you @luceos for putting in the hard work to make this the only working private messaging extension currently.
Using the API, how can i exclude private discussions from appearing on results? The is:private
gambit works, but i can't use -is:private
to exclude. If this isn't available, could i get some suggestions on what work i should do to make this a reality?
Thanks !