mod_abstraction links a new API function to another using a regular expression parser to adapt the provided arguments. It allows for simplified, standardized script replacement API.
You MUST reload mod_abstraction when changing the XML to add or remove an API, or else they won't be created or removed. Destination settings and parsing can be changed in real time.
This defines what API link should be created and what to do once executed.
- name - API name
- description - API description
- syntax - API Syntax
- parse - Regex parsing the original argument provided
- destination - The API name of the final api execution
- argument - Format for the argument sent to the final API. You can use $1 $2 $3... from the () result of the parse regex
With mod_event_socket per-user API restriction, this can be useful to limit the capabilities a user can have over some API commands by restricting certain parameters a user can do.
Here are 2 examples:
tts_path(<text>) could be rewritten to python(tts2wav <text>)
user_password(<id>) could be rewritten to user_data(<id> param password)