Merge branch 'api'
[wolnelektury.git] / apps / api / urls.py
1 # -*- coding: utf-8 -*-
2 from django.conf.urls.defaults import *
3 from piston.resource import Resource
4
5 from api import handlers
6
7
8 book_changes_resource = Resource(handler=handlers.BookChangesHandler)
9 tag_changes_resource = Resource(handler=handlers.TagChangesHandler)
10 changes_resource = Resource(handler=handlers.ChangesHandler)
11
12 urlpatterns = patterns('',
13     url(r'^book_changes/(?P<since>\d*?)\.(?P<emitter_format>xml|json|yaml)$', book_changes_resource),
14     url(r'^tag_changes/(?P<since>\d*?)\.(?P<emitter_format>xml|json|yaml)$', tag_changes_resource),
15     url(r'^changes/(?P<since>\d*?)\.(?P<emitter_format>xml|json|yaml)$', changes_resource),
16
17
18     url(r'book/(?P<id>\d*?)/info\.html$', 'catalogue.views.book_info'),
19     url(r'tag/(?P<id>\d*?)/info\.html$', 'catalogue.views.tag_info'),
20 )