-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
reason why api holds old sets? #78
Comments
Those sets recently rotated out, and depending on what people are using the API for, that may be useful. |
See #52; v5 took the opinion that the site should support upcoming and recently expired sets for the UI. It is easy to filter the expired sets out if you are consuming, but I understand where you are coming from when using services that are hard to customize. There have been proposals for supporting multiple endpoints (pre-filtered endpoints), but it is hard to do (read: I think impossible) with a Github Pages hosted API. |
What @forstermatth said is correct! To expand: We are hosted on GitHub Pages because it's free, but the disadvantage is that it only serves static content (the API is static content! I handwrite it :P). Previous API versions would contain exactly Standard sets and I would manually update it at midnight on release days. But I hated doing it and would sometimes forget. Around the same time we started moving the website to be powered by the API rather than raw HTML (partly to help with this, so I wouldn't need to update two things). So in v5 we started over-including sets, with the advantages that
but with the disadvantage that
I don't super like this solution, especially because it violates the whole name of the website! So in #55 we've been gathering reasons it would be nice to move off GitHub Pages to something with a backend. Coincidentally I have been toying with backends over the last 3 days or so! So it's probably safe to expect something medium-term. PS: That's an awesome badge! Did you make that? |
Ok, I see your reasons. I totally like GitHub pages and it's simplicity. 👍
If you setup travis you could run a script which, depending on date, manages the deletion of rotated sets and then pushes a commit to master (or creates a pr) with the updates. GitHub pages would immediately reflect that. The API could still have recently rotated sets or upcoming ones, but with a special status flag like
I used a great service called https://shields.io/ for that. They have a ton of different static or service dependent badges, but also offer the possibility for a custom dynamic badge like this. ❤️ |
Yeah that's very true! I'll look into that as well. |
I'm wondering what the reasoning is behind the API containing dropped sets.
Currently many sets like BFZ are shown.
I realized when I wanted to use this dynamic badge which uses the api as data source:
API endpoint used: https://whatsinstandard.com/api/v5/sets.json
When the page is updated to drop sets, why not update the api as well?
The text was updated successfully, but these errors were encountered: