whatsinstandard icon indicating copy to clipboard operation
whatsinstandard copied to clipboard

API TODO

Open glacials opened this issue 5 years ago • 7 comments

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)

  • #209

glacials avatar Jul 18 '19 22:07 glacials

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.

connor-bracewell avatar Jul 21 '19 23:07 connor-bracewell

While Ixalan Block is still in Standard, it makes sense for them to do that. We'll see how it looks after ELD comes out in september.

silasary avatar Jul 22 '19 03:07 silasary

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"

A7F avatar May 19 '20 17:05 A7F

@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.

glacials avatar May 19 '20 20:05 glacials

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).

bakert avatar Jun 06 '21 14:06 bakert

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.

silasary avatar May 08 '23 07:05 silasary

Agreed! Added :)

glacials avatar May 08 '23 07:05 glacials