Closed bclindner closed 5 years ago
Still entertaining the idea. The GJSON library seems perfect for the dot-notation stuff and is popular and supported, but I'm skeptical of relying on any more third party libraries than I already have.
Done in commit 6d0de73. A little buggy, needs work.
A generic command to hit REST endpoints would be helpful. General design might involve a config like this:
Basically you give it a regex trigger string and it constructs the endpoint based on the groups in that regex in a
printf
style, where every argument after the first is a number corresponding to a regex group. Then a response can be constructed with a similar array, where every argument after the first is a string corresponding to a key in the API.This would be extremely tricky to implement acceptably, so some redesign may be needed.
The currently-existing XKCDCommand could hopefully be re-implemented as a RESTCommand.