Make API RESTful (kind of) #261

Merged
UnchartedBull merged 15 commits from master into master 2019-10-20 19:52:04 +01:00
UnchartedBull commented 2019-10-09 16:21:38 +01:00 (Migrated from github.com)

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.

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.
StefanCohen commented 2019-10-09 23:47:36 +01:00 (Migrated from github.com)

I tested most of the features tonight and wrote up a draft documentation.

I tested most of the features tonight and wrote up a draft documentation.
UnchartedBull commented 2019-10-10 16:50:52 +01:00 (Migrated from github.com)

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!

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!
UnchartedBull commented 2019-10-10 22:57:10 +01:00 (Migrated from github.com)

Ok everything is Ready now. @vitormhenrique could you please review and merge once you have some spare time? Thanks!

Ok everything is Ready now. @vitormhenrique could you please review and merge once you have some spare time? Thanks!
vitormhenrique commented 2019-10-11 08:36:56 +01:00 (Migrated from github.com)

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

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
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/OctoPrint-Enclosure#261