Skip to content
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 inconsistency and payload props naming #164

Closed
RobinTail opened this issue Aug 9, 2023 · 3 comments · Fixed by #240, #241, #242 or #239
Closed

API inconsistency and payload props naming #164

RobinTail opened this issue Aug 9, 2023 · 3 comments · Fixed by #240, #241, #242 or #239
Labels
enhancement New feature or request refactoring Better implementation of the same thing

Comments

@RobinTail
Copy link
Collaborator

This is actually not a pin, it's a relay index (r1..r8).

UPDATE_COMMAND: [ "pin" ],
GET_STATUS_COMMAND: [ "pin" ],

It should be renamed.
In order to do this without breaking changes, we should support backward compatibility somehow.

@RobinTail RobinTail added refactoring Better implementation of the same thing breaking Breaking changes labels Aug 9, 2023
@RobinTail
Copy link
Collaborator Author

get_api_commands lists mandatory parameters, so basically, it should become empty to support backward compatibility

@RobinTail
Copy link
Collaborator Author

There is also a chance to align payload props, having "active", "status", "result" and other inconsistent naming for relay states.

@RobinTail
Copy link
Collaborator Author

Another issue is that some API errors responses have status code 200.
There should be a way to to flask.abort with message.

@RobinTail RobinTail changed the title Incorrect param naming for API commands API inconsistency Oct 15, 2023
@RobinTail RobinTail changed the title API inconsistency API inconsistency and payload props naming Oct 15, 2023
@RobinTail RobinTail added enhancement New feature or request and removed breaking Breaking changes labels Oct 17, 2023
This was referenced Oct 21, 2023
@RobinTail RobinTail linked a pull request Oct 22, 2023 that will close this issue
@RobinTail RobinTail mentioned this issue Oct 22, 2023
This was linked to pull requests Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring Better implementation of the same thing
Projects
None yet
1 participant