Opting out to getPlayerInfo data to reduce ratelimits
migue802 opened this issue · 1 comments
Before posting a feature request, make sure that it hasn't been suggested before, is a feasible idea, and can benefit everyone.
Is your feature request related to a problem? Please describe.
While doing too many requests to getPlayerInfo, "friends.roblox.com" usually returns a 429, throwing a rejection and breaking stuff, due to the function doing 3 requests to that domain at once per getPlayerInfo call.
Describe the solution you'd like
I propose to do a opt-out to data I don't want to request. (A rate-limit handler would be great too but that would require much work than this I guess)
For eg., when doing tons of requests from users, I don't want to get friends or follower counts, neither username history, that would reduce processing time and avoid hitting ratelimits.
Describe alternatives you've considered
Another argument in getPlayerInfo where I can disable requests to "friends.roblox.com" and username history. For example:
noblox.getPlayerInfo(1, {friends: false, followings: false, followers: false, usernameHistory: false})
Additional context
N/A
We've had some discussion around this in the past, and at the time our approach was going to be splitting each of those pieces of data into separate methods (which getPlayerInfo then calls) but it hasn't been actioned so far