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
13 lines
534 B
Python
13 lines
534 B
Python
"""URL patterns for the dispatcher API."""
|
|
|
|
from django.conf.urls import patterns, url
|
|
|
|
from dispatch.views import DispatchMessage, DispatcherList, DispatcherDetail
|
|
|
|
|
|
urlpatterns = patterns('dispatch.views',
|
|
url(r'^api/dispatchers/$', DispatcherList.as_view(), name='dispatch_api_dispatchers'),
|
|
url(r'^api/dispatchers/(?P<pk>[0-9]+)/$', DispatcherDetail.as_view(), name='dispatch_api_dispatcher_detail'),
|
|
url(r'^api/dispatchers/(?P<pk>[0-9]+)/message$', DispatchMessage.as_view(), name='dispatch_api_dispatch_message'),
|
|
)
|