Skip to content
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

feat: create rate limiter plugin #255

Closed
wants to merge 1 commit into from

Conversation

nolbuzanis
Copy link
Contributor

Summary

Uses the limiter package under the hood to rate limit requests to the twitter api for individual endpoints. Current code shows the functionality of the plugin. Can add more endpoints with their own specific rate limits to the plugin in the next commit if the functionality looks good.

Why is this important?

It would be nice to provide each rate limiting right out of the box, as pointed out by @nicholaschiang in #190 (comment)

Test plan

3 tests added to plugin.test.ts.

npm run test-plugin

uses limiter package under the hood to rate limit requests to the twitter api for individual endpoints
@nolbuzanis
Copy link
Contributor Author

Ideally would like to create a new branch for this or add to an existing dev branch - not merge with master!

@alkihis
Copy link
Collaborator

alkihis commented Apr 7, 2022

Thanks for your pull request, but I can't accept it.

Plugins are not meant to be part of twitter-api-v2 package, they should be a separate package (that you can publish by yourself).
Plus, this lib is dependency free, and we shouldn't add a dependency now, especially just for a plugin 😓

@alkihis alkihis closed this Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants