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

API TODO #138

Open
glacials opened this issue Jul 18, 2019 · 7 comments
Open

API TODO #138

glacials opened this issue Jul 18, 2019 · 7 comments

Comments

@glacials
Copy link
Owner

glacials commented Jul 18, 2019

This is a catch-all for changes to make when API v7 is introduced (whenever that may be) or even to add into current/previous APIs under new keys.

  • (maybe) Nation-specific legality: The China announcement makes determining what is in Standard a country-specific question. If you're in China the answer is different from if you're anywhere else. For now we have no localization and it's not clear if WotC will continue this pattern or if this is a one-time experiment, so let's give this one time before we decide to implement it.

  • (maybe) Thematic blocks: sometimes there's a group of sets that shares one theme, like Ravnica. It may be nice to express this in the API.

  • Put bans inside set objects to make it easier to deal with bans naturally rotating out due to the containing set rotating out. (Note this advantage isn't gained from rotating in, because bans are usually announced some time after the containing sets enter Standard.) i.e. change from:

    {sets": [{"name": "...", ...}, ...], "bans": [ ... ], ...}
    

    to:

    {"sets": [{"name": "...", "bans": [ ... ], ...}, ...], ...}
    
  • Stop rendering .000 milliseconds on timestamps, since any timestamp we ever render will be, at most, day-precise. (Perhaps ISO 8601 allows omitting an actual time?)

  • (maybe), (can apply to v6) If we return exactly the sets in standard rather than a superset, allow the requester to specify a time zone to render the results in. For example, hitting the API at 23:00 GMT-8 the day before rotation would return the sets as they are before rotation, but hitting it at 02:00 GMT-5 the day of rotation (which is the same moment) would return the sets as they are after rotation.

    We don't need to have backend logic for this; we could just have generate.js render an ~identical JSON file for each time zone, e.g. whatsinstandard.com/api/v7/GMT-8/standard.json. We could continue to render an unlabeled file for those who don't care, and just say that file has a 1 day margin of error.

  • Add some field(s) to the set object to indicate and/or explain any weirdness with how the set interacts with Standard. e.g. March of the Machine: The Aftermath is the fifth set in a "block" / ninth legal set in Standard and is a special 50-card micro set. The field(s) could be something generic and human-readable like a note string, and/or something specific and machine-readable like a micro boolean, special boolean, or type enum-ish string.

  • Add some field(s) to the banned card object to display the transformed version, if the banned card transforms (as Fable of the Mirror-Breaker does)

  • DRY release dates and drop dates #209

@glacials glacials mentioned this issue Jul 18, 2019
@connor-bracewell
Copy link
Contributor

Regarding the second point, Wizards is applying that kind of grouping on their own site: https://magic.wizards.com/en/content/standard-formats-magic-gathering - so there's definitely some precedent and official naming for it going forward. You could always keep an eye on that page and have WIS mirror the Wizards approach to set grouping.

@silasary
Copy link
Contributor

silasary commented Jul 22, 2019 via email

@A7F
Copy link

A7F commented May 19, 2020

might also be useful to make consistent the fields sets["enterDate"]["rough"] and sets["exitDate"]["rough"], perhaps they can be converted in an actual time instead than parsing the quartiles of the year? Up to now, in some expansions there's "Q1 2020" and in others (theros) "January 2020"

@glacials
Copy link
Owner Author

@A7F Totally open to this, but curious what your use case is -- can you explain a bit more about why that change would be helpful to you?

The current pattern was picked with the expectation that API consumers would be ultimately just display it to the user, as it's hard to perform arithmetic on such a vague representation of a date. I'd love to learn more about other ways people are using it.

@bakert
Copy link
Contributor

bakert commented Jun 6, 2021

Feature request for v7 – separate dates for MTGO/Arena/paper. These things now differ every time (at least between paper and MTGO, which is what I'm concerned with).

@glacials glacials changed the title API v7 TODO API TODO Apr 29, 2023
@silasary
Copy link
Contributor

silasary commented May 8, 2023

I don't know if Aftermath is a one-off, but if they continue doing Micro-sets, it'd be nice to have a flag for them.

@glacials
Copy link
Owner Author

glacials commented May 8, 2023

Agreed! Added :)

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

No branches or pull requests

5 participants