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

allow passing key to [stackexchange] #8539

Merged
merged 5 commits into from
Dec 4, 2022

Conversation

chris48s
Copy link
Member

@chris48s chris48s commented Oct 17, 2022

closes #5415
closes #3591

This is the code bit. It allows us to optionally pass a key when calling the StackExchange API. Once deployed, I'll also need to set a stackapps_api_key in prod. I've tested locally with a key and can confirm that without auth our quota is 300 per day and passing a key raises our quota from 300 requests per day to 10,000. This should cover our current usage (although these have been unreliable for a long time, so I suspect that contributes to the low traffic on these badges).

If we ever outgrow that:

  • I think there is a mechanism to request an increased quota if we need it
  • We could look at increasing the cache lengths on these

@chris48s chris48s added the service-badge Accepted and actionable changes, features, and bugs label Oct 17, 2022
@shields-ci
Copy link

shields-ci commented Oct 17, 2022

Warnings
⚠️ This PR modified the server but none of its tests.
That's okay so long as it's refactoring existing code.
⚠️ This PR modified service code for stackexchange but not its test code.
That's okay so long as it's refactoring existing code.
Messages
📖 ✨ Thanks for your contribution to Shields, @chris48s!
📖

Thanks for contributing to our documentation. We ❤️ our documentarians!

Generated by 🚫 dangerJS against 563f901

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. couple inline thoughts but nothing that needs to block

doc/server-secrets.md Outdated Show resolved Hide resolved
services/stackexchange/stackexchange-base.js Show resolved Hide resolved
@chris48s
Copy link
Member Author

chris48s commented Dec 1, 2022

Modifying the docs has dismissed the review. If you can give me a quick re-:+1: on this one I'll sort out getting it deployed with a key over the weekend.

@repo-ranger repo-ranger bot merged commit 53c5cfa into badges:master Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge Accepted and actionable changes, features, and bugs
Projects
None yet
4 participants