-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
# rpi-radio-alarm | ||
package for the rpi-radio-alarm development | ||
Package to simplify the communication to a instance of the [rpi-radio-alarm](https://github.com/bb4L/rpi-radio-alarm) | ||
|
||
## Usage | ||
# Usage | ||
`pip install rpi-radio-alarm` | ||
|
||
### Return Values | ||
The `ApiHelper` object takes a `ResponseParser` as optional argument. | ||
This defines the way the different Responses are returned. | ||
## Objects | ||
This package includes two classes. | ||
|
||
### ApiHelper | ||
This class can handle commands and arguments and send them to the [rpi-radio-alarm](https://github.com/bb4L/rpi-radio-alarm) and return the response | ||
|
||
This is done in the `do_command(cmd, args)`, `cmd` has to be one of `constants.COMMANDS` and `args` is a dictionary with the appropiate values. | ||
|
||
### RpiArgumentParser | ||
The `RpiArgumentParser` parses string input to correct arguments for the ApiHelper. | ||
|
||
### ResponseParser | ||
This class defines for the `ApiHelper` how to parse the response from the [rpi-radio-alarm](https://github.com/bb4L/rpi-radio-alarm). | ||
|
||
# Example Usages | ||
[rpi-radio-alarm-discordbot-python](https://github.com/bb4L/rpi-radio-alarm-discordbot-python) | ||
|
||
[rpi-radio-alarm-telegrambot](https://github.com/bb4L/rpi-radio-alarm-telegrambot/) | ||
|
||
# License | ||
[LGPLv3](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters