nicholasf / spoonbot

Spoonbot - an IRC bot written in Elixir with a simple command syntax.
16 stars 6 forks source link

Commands and the HTTP bridge. #3

Closed bitwalker closed 10 years ago

bitwalker commented 10 years ago

Per our conversation in IRC, if we want a RESTful API for HTTP access, then we need a way for commands to register themselves as GET/POST/PUT/DELETE commands. The problem here is that information would have to be provided by the command module itself, which means we have protocol specific information polluting the command module, which is intended to be protocol agnostic.

This issue is mainly to get some discussion started around considerations, possible workarounds/solutions, etc.

nicholasf commented 10 years ago

Agreed about the pollution problem.

Perhaps it's not going to be possible to write commands that can be run across different protocols with such precision.

How does Hubot handle HTTP commands?

nicholasf commented 10 years ago

I think that commands which work across all protocols would be too complex. It'd be simpler to start out by making them protocol specific.