-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display X/Twitter API rate limits #354
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the PR, @s3rgiosan! This looks great and tests well. I just have a few points to discuss before we conclude and mark this as ready for merge:
-
The rate limit for the 15-minute window is very high (1079999 out of 1080000). I don't think it will ever be utilized. How about we drop displaying it and only show the 24-hour limit for the user and app?
-
In the Block editor panel, the note under the limits currently appears for each account. Maybe we should display it only once, similar to how it's done for the dashboard widget. Additionally, how about keeping the rate limits data hidden until the account toggle is enabled?
Thank you.
Hi @iamdharmesh
Agreed. Since those headers are already being stored, they'll be available if we ever need to display them. I've removed them from both the dashboard and the block editor panel.
Both things were addressed. Can you review again? Thanks! |
Hi @s3rgiosan, Thanks for the quick updates on this; it looks great now. Apologies for bringing up one more thing to discuss. As we are using the same app for all accounts, it would be great if the limits could be updated for each account whenever a tweet is posted from any account. Currently, it only reflects on the account from which the tweet was made. This is not a major issue and only comes into play when multiple accounts are connected to the site (which is not always the case), but I just wanted to hear your thoughts on this. Otherwise, everything looks good to me. Thank you. |
@iamdharmesh Does the plugin support multiple connected apps, or is it limited to a single one? If it's limited to one, we could store the app's rate limits at a global level instead of per account. Alternatively, whenever a tweet is made, we could iterate through all accounts to update their corresponding app limit values. |
@s3rgiosan it is limited to a single app. All user accounts are connected using the same app. |
Thanks. I'll take a look and update the PR |
…-for-twitter into feature/rate-monitor
Hi @iamdharmesh — I’ve updated the PR as requested. The limits are now displayed per user account, followed by the app limits. The app limits are fetched from the first user account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@s3rgiosan Thanks for making all the changes here! Things look good, test well, and are ready to be merged.
Note: I made some minor changes to fix the user rate limit reset issue for another user and updated the UI slightly
Description of the Change
Display X/Twitter API rate limits
How to test the Change
Changelog Entry
Credits
Props @s3rgiosan
Checklist: