Giter Site home page Giter Site logo

Comments (5)

silasary avatar silasary commented on May 20, 2024

Those sets recently rotated out, and depending on what people are using the API for, that may be useful.

from whatsinstandard.

matt-forster avatar matt-forster commented on May 20, 2024

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.

from whatsinstandard.

glacials avatar glacials commented on May 20, 2024

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

  • it wouldn't need me to do anything at midnight and
  • the site could use the over-included sets in past/future sets UIs,

but with the disadvantage that

  • consumers would have to filter down to Standard sets themselves (see the API README for a JavaScript function).

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?

from whatsinstandard.

tooomm avatar tooomm commented on May 20, 2024

Ok, I see your reasons.

I totally like GitHub pages and it's simplicity. 👍
But can't you prevent a hosted service with backend?

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.

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.
To automate the process, you can setup a daily travis run (cron job) at midnight for example.

The API could still have recently rotated sets or upcoming ones, but with a special status flag like dropped or upcoming.


PS: That's an awesome badge! Did you make that?

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. ❤️
Check the starting post, I added the url!

from whatsinstandard.

glacials avatar glacials commented on May 20, 2024

Yeah that's very true! I'll look into that as well.

from whatsinstandard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.