-
-
Notifications
You must be signed in to change notification settings - Fork 34
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 v5 #52
Comments
I have a proposal: since MTG is available in different languages, we probably can provide the localized version of the json for these languages. I think that in this case what can be easiily done is to create different api uri like: The easiest thing to do is to create different files one per each language. But the drawback is that then when every block will be released, we must update many files. Another possible implementation could be that we update the json programmatically depending on the request (drawback: more code) And like said in #45 probably a reference to the block is needed if we want to programmatically populate the webpage. |
@inuyasha82 @glacials Continuing the discussion from #45 I think the API should just return all of the sets that we have supported (perhaps even include the addition of all the sets w/ dates as that information is available), and a client application should be smart enough to filter the sets by date. We could also provide endpoints that drill a bit further down and return the filtered sets, allowing clients to not have to manage the dates themselves (very convenient - for them at least). I'd also like to see endpoint inclusion for the other lists we have presented on the page, banned cards and ban list announcements. An example of the endpoints (just ideas):
|
Bans is definitely something we should have in the API, and is a relatively easy add. I agree with a lot of the rest of your comment, but this is biting off a bit more than I'm willing to chew right now. Remember that there's no possibility for backend code while we're hosted in GitHub pages, so supplying endpoints like
I think 3 is inevitable, but now isn't the right time to do it. The advantages are there, but aren't yet large enough to be worth the effort and money. Plus I don't really have the free time right now. However it's probably important that we keep track of the eventual advantages, so I'll make an issue for it (EDIT: #55). |
@glacials With the addition of Vue, it is definitely possible to do this filtering in the client without a server, from some conversations I've had with my co-workers who work on browser side code. In fact, this can be done with vanilla javascript and basic XHR. |
The basic flow would be:
|
Right, that would work if we had only the
is a server-side concern. |
@glacials I rescind my comment, you are correct. There is no way to make a client side page that emulates a pre-rendered JSON response. |
I think that at the moment, the only option available is mantain three different json files, one for each endpoint, that probably will result in something like: Then we can investigate how to create a backend infrastructure, and how to host it. |
This is a working todo list for the next API version.
Allow sets that have rotated out to be returned
The API v4 spec allows not-yet-Standard sets to be included in the response, but not once-Standard sets. We should allow both (because we'll need both to power the site with the API) and have consumers filter them out based on
enter_date
andexit_date
. Code snippets for filtering them out would be very helpful to include here.Move from
/\d+/
to/v\d+/
in the pathJust because it feels more common on the web.
The text was updated successfully, but these errors were encountered: