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

(feat) enhanced api #99

Closed
wants to merge 10 commits into from
Closed

Conversation

kohlsalem
Copy link
Contributor

@kohlsalem kohlsalem commented Jan 29, 2024

New API for

Get Plugin List

To retrieve a list of available plugins in JSON format, make an HTTP GET request to the following endpoint:

GET http://your-server/getpluginlist

Set Active Plugin by ID

To set an active plugin by ID, make an HTTP GET request to the following endpoint:

http://your-server/setplugin

Parameters

  • id (required): The ID of the plugin to set as active.

Response

  • Success: 200 OK with the message "Plugin Set".
  • Not Found: 404 Not Found with the message "Plugin not found".

Set Brightness

To set the brightness of the LED display, make an HTTP GET request to the following endpoint:

http://your-server/setbrightness

Parameters

  • value (required): The brightness value (0..255).

Response

  • Success: 200 OK with the message "Ok".
  • Invalid Value: 404 Not Found with the message "Invalid Brightness Value".

@kohlsalem
Copy link
Contributor Author

kohlsalem commented Jan 29, 2024

Tested and it works.
@ph1p Phil, unless yiu have issues with the naming of the marameters, i think this is goodd to be merged. It can hardly break anything existing.
I intentionally did not distribute the handlers to the components (screen and plugin manager). I did that, but it unnececarily bloated the coding.

@kohlsalem kohlsalem mentioned this pull request Jan 29, 2024
@kohlsalem
Copy link
Contributor Author

closed if favor of #100

@kohlsalem kohlsalem closed this Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant