Open gdude2002 opened 10 years ago
This is doing really, really well. Latest push as of this comment adds the beginnings of an API and an admin interface. Looking sweet!
A lot of progress has been made on the web interface lately. Admin interface allows you to view config and data files - as well as edit and save data files, which are reloaded automatically.
Thus, plugins that have registered reload() callbacks for their data files really play nicely with this. Editing of config files is also coming!
Config files can be saved now. All works pretty much as expected. There's a few more things to look into, though.
settings.yml
Graphs? Graphs. Graaaaaaphs..
More to come!
Working on the redesign.
EDIT: There's no scrollbar at the bottom of the menu, ignore that. :3
A few suggestions have been gained from @Zarthus
Blocked by #14
No longer blocked, #14 is done.
Here's some screenshots!
Now that I've sorted out my API stuff for this plugin, let's see what we might do for routes.
/api/v1/[key]
/manage
- This is for management, eg loading/unloading/info/plugins
/[action]
(Params: {"protocol": "[plugin-name]"}
)/protocols
/[name]
(Params: {"protocol": "[protocol-name]"}
)/core
- This is for core protocol actions (generic stuff, eg sending messages)/protocols
/[name]
/[action]
/ws
- Websockets!/[socket_name]
- (Haven't decided on this yet, need to look into how ws/etc works)/plugins
- This is for api calls registered by plugins (separately, not generic stuff)/[name]
/[action]
/protocols
- This is for api calls registered by protocols (separately, not generic stuff)/[name]
/[action]
/api/v1/[key]/manage/protocols/shutdown
(Params: {"protocol": "irc-esper"}
) - Shut down the irc-esper
protocol/api/v1/[key]/manage/protocols/reload
(Params: {"protocol": "irc-stormbit"}
) - Reload the irc-stormbit
protocol/api/v1/[key]/manage/plugins/reload
(Params: {"plugin": "URLs"}
) - Reload the URLs
plugin/api/v1/[key]/manage/plugins
- List all plugins and whether they're loaded or unloaded/api/v1/[key]/manage/protocols
- List all configured protocols and their statuses/api/v1/[key]/core/protocols/irc-esper/send_msg
- Send a message to a channel or user on the irc-esper
protocol/api/v1/[key]/core/protocols/irc-stormbit/join_channel
- Join a channel on the irc-stormbit
protocol/api/v1/[key]/ws/[socket-name]
- Not sure yet, probably going to use these to stream various types of events/api/v1/[key]/plugins/factoids/get
- Get the contents of a factoid/api/v1/[key]/plugins/factoids/set
- Create or replace a factoid/api/v1/[key]/plugins/factoids/append
- Add a line to a factoid/api/v1/[key]/plugins/factoids/delete
- Delete a factoid/api/v1/[key]/protocols/irc-esper/mode
- Set a mode on a channel on the irc-esper
protocol/api/v1/[key]/protocols/mumble/set_permissions
- Set some permissions on a channel on the mumble
protocolAny thoughts on this layout, @rakiru?
Recreating this issue
More of a note myself, this will use the awesome Bottle framework and CherryPy HTTP stack.
The way Twisted handles this kind of thing is.. twisted.. and well, doesn't suit plugin compatibility at all, so we're going to have to use something which supports routing and other convenient functions - which Bottle does - and is fast - which CherryPy certainly is.
I'll be handling this, but anything that we think may be required should be commented below.