-
Notifications
You must be signed in to change notification settings - Fork 22
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
Versioning #17
Comments
#39 seems to have started on this |
#39 is about the feedback, next step is creating an header when doing: >>> eve(version=4) This will be a challenge however as we may or may not have the required information at that point to create the For now one could inject the headers I suppose, at least you can have a clue about which version you're getting served by CREST |
not all endpoints support all versions either |
@jonobrien do you have an example endpoint were that's the case? |
I'm wondering if I didn't had this issue one time, with the market order endpoints... But i can't find any trace in my commits, so it must have been on my dev env... I think the best way to do it here is to set no HTTP Accept, so it will always pull the latest version, unless the user manually specify it when he call the get method on APIConnection. |
Hmmm @jonobrien I think I misunderstood you before. You mean I can't ask for @wtfrank is working on the APIException to return additional information which it got back from CREST. This (requesting a invalid version endpoint) is a case which should be taken into account for that I suppose. @Kyria |
@hkraal check out some schemas at crestmatic there are the json schemas of some endpoints with the api version they support, not sure if all endpoints are available for all versions, as you clarified for me. I have not tried querying with an older header to an older endpoint, it may still work, it may not. @Kyria this works unless we don't handle an endpoint change CCP makes and we become broken after a change to CREST. There is v5 right now, I believe is the latest(?) and we are working fine on that. |
if we dynamically walk endpoints it actually probably doesn't matter if we just request latest version anyway, so having default be latest, flag for certain version might be a good way of handling things. |
I agree that the sensible thing to do is not request any endpoint version unless the user requests one. If the user requests version 57 (which doesn't exist) then we should just send that in the header to CCP and allow them to return whatever error they want. So a really dumb piece of code is all that's needed: if version_specified then set_header(the_version_that_was_specified) so the documentation of the feature will be bigger than the implementation of it :) |
I would just write it in 5 minutes and make a pull request, but I should resist the urge and wait until the cache info change finds its way into main so I can test it properly! |
Per the (documentation)[http://eveonline-third-party-documentation.readthedocs.org/en/latest/crest/versioning/], versioning should be supported on a per-resource basis. Right now you can modify the headers when you create the connection, but not when you call a resource.
The text was updated successfully, but these errors were encountered: