Commit Graph

13 Commits

Author SHA1 Message Date
Brian S. Stephan b9b626d2ef remove useless import 2015-08-14 16:55:02 -05:00
Brian S. Stephan 6bf2732d7f dispatch: handle writing unicode to file properly 2015-07-11 08:09:53 -05:00
Brian S. Stephan 598a158300 dispatch: helps if i actually use the new text 2015-06-20 11:26:35 -05:00
Brian S. Stephan f542a862b8 dispatch: have option to include key in output 2015-06-20 11:23:28 -05:00
Brian S. Stephan 98bb608291 dispatch: allow dispatcher key in API URLs as well 2015-06-20 11:22:17 -05:00
Brian S. Stephan e194ae0319 dispatch: don't override get_object() in /message 2015-06-20 01:13:11 -05:00
Brian S. Stephan 095221a7b2 dispatch: properly write bytes to file 2015-06-19 16:46:46 -05:00
Brian S. Stephan 9296123f25 dispatch: require explicit send_message permission 2015-06-19 16:45:10 -05:00
Brian S. Stephan bece1745b3 dispatch: include 'message': "" in /message GET
mostly as a hint to illustrate how to use the thing
2015-06-19 15:10:21 -05:00
Brian S. Stephan 3532b073c4 dispatch: nest the dispatcher -> action serializer 2015-06-19 15:08:57 -05:00
Brian S. Stephan 4f717cb1c2 dispatch: break Dispatcher actions into 2nd model
decouple the dispatcher (a key, basically) with the actions to take upon
receiving such a message. allows us to have multiple actions for one key
without weird hacks
2015-06-19 11:29:00 -05:00
Brian S. Stephan dac7999c0f dispatch: use generics better (?) in /message
use GenericAPIView rather than APIView in order to get some common idiom
stuff done for us. we continue to support GET and POST in
DispatchMessage, now it's just a bit cleaner. i think.

anyway if we were doing this stuff more we could/should probably create
mixins for them, but at the moment this is pretty sane i think
2015-06-19 10:51:11 -05:00
Brian S. Stephan 0641e1c062 dispatch: port to django REST framework
this moves the dispatcher functionality that used to be in the old
ircbot directly to django REST framework, which is more robust and
allows for cooler stuff down the road. this still retains the ability to
have the bot privmsg, that still happens over the XML-RPC interface,
this is just a more convenient frontend to that
2015-06-18 23:57:43 -05:00