Make API RESTful (kind of) #261
Reference in New Issue
Block a user
Delete Branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
I've come up with a first draft on how the API could like so it gets a little more easy to query it. It now also can return temperature and filament inputs. I hope it matches your idea of the API.
I tried sticking to the general API conventions as well closes #169.
@bistory @Baumi1245 could you please check if this matches your requirements.
NOT TESTED YET
I haven't tested it yet. I will do that most likely tomorrow if I have access to the OctoPrint System again. Just want to open this here so we can get some feedback.
I tested most of the features tonight and wrote up a draft documentation.
I've also tested the features again and everything seems to be working. The API is by no means close the REST Standard, it is way closer than the current one though. I didn't want to change a lot of your code so I reused the existing functions and just renamed the APIs and changed the parameters.
You can find the very good documentation from StefanCohen at API.md, which I slight adjusted to be consistent. Of course some could do more to generate an even better API but that isn't possible for me without major helping from your side. I still think anyways that this version of the API will be enough for most people and can close a couple of issues you're having. Please feel free to tell us any remarks / changes you would like. Otherwise we will be happy if this gets merged once @StefanCohen confirms that his side (eventbus) is finished. There will be no further adjustments from my side (unless you request some 🤔 ).
Thanks again for this awesome plugin!
Ok everything is Ready now. @vitormhenrique could you please review and merge once you have some spare time? Thanks!
Will do, thanks for the effort.
I’m on vacations in Germany until 17th. Once I get back I’ll tackle down
some bugs, do a code review and publish it.
Best regards.
Vitor Henrique