play/play — pull request #349 by technicalpickles (2013-09-29 17:08:18+00:00)
Title: v3-channels: Add commands API

One of the problems with play-hubot integration is that the script and play's API have to be kept in sync. Also, writing coffeescript.

This adds a Api::CommandsController which takes a channel name, user to act as, and the text of a command, and then does the thing. The hubot script will then be able simply call this controller, including the user's github login and either an explicitly specified channel, or a one inferred from the environment or the current room.

The code is pretty ugly right now, but I could imagine refactoring it into a Command model. There's also some duplicated code between this and Api::ChannelsController.

I could also imagine adding command line interfaces in other places, like a `play` excutable, or change the search bar into a command bar on the website, or possibly add command lines to native clients.

/cc @maddox @holman @thedaniel