properly register auto-flattr celery task
[mygpo.git] / mygpo / api / urls.py
blob47e16f66315fd635de0ed89a942ea8ae19deb1fe
1 from django.conf.urls.defaults import *
3 urlpatterns = patterns('',
4 (r'^upload$', 'mygpo.api.legacy.upload'),
5 (r'^getlist$', 'mygpo.api.legacy.getlist'),
6 (r'^toplist.opml$', 'mygpo.api.simple.toplist', {'count': 50, 'format': 'opml'}),
9 urlpatterns += patterns('mygpo.api.simple',
10 (r'^subscriptions/(?P<username>[\w.-]+)/(?P<device_uid>[\w.-]+)\.(?P<format>\w+)', 'subscriptions'),
11 (r'^subscriptions/(?P<username>[\w.-]+)\.(?P<format>\w+)', 'all_subscriptions'),
12 url(r'^toplist/(?P<count>\d+)\.(?P<format>\w+)', 'toplist', name='toplist-opml'),
13 (r'^search\.(?P<format>\w+)', 'search'),
14 url(r'^suggestions/(?P<count>\d+)\.(?P<format>\w+)', 'suggestions', name='suggestions-opml'),
15 (r'^toplist\.(?P<format>\w+)$', 'toplist', {'count': 50}),
16 url(r'^gpodder-examples\.(?P<format>\w+)$', 'example_podcasts', name='example-opml'),
19 urlpatterns += patterns('mygpo.api.advanced',
20 (r'^api/[12]/subscriptions/(?P<username>[\w.-]+)/(?P<device_uid>[\w.-]+)\.json', 'subscriptions'),
21 (r'^api/(?P<version>[12])/episodes/(?P<username>[\w.-]+)\.json', 'episodes'),
22 (r'^api/[12]/devices/(?P<username>[\w.-]+)/(?P<device_uid>[\w.-]+)\.json', 'device'),
23 (r'^api/[12]/devices/(?P<username>[\w.-]+)\.json', 'devices'),
25 (r'^api/2/auth/(?P<username>[\w.-]+)/login\.json', 'auth.login'),
26 (r'^api/2/auth/(?P<username>[\w.-]+)/logout\.json', 'auth.logout'),
27 (r'^api/2/tags/(?P<count>\d+)\.json', 'directory.top_tags'),
28 (r'^api/2/tag/(?P<tag>[^/]+)/(?P<count>\d+)\.json', 'directory.tag_podcasts'),
29 (r'^api/2/data/podcast\.json', 'directory.podcast_info'),
30 (r'^api/2/data/episode\.json', 'directory.episode_info'),
32 (r'^api/2/chapters/(?P<username>[\w.-]+)\.json', 'episode.chapters'),
33 (r'^api/2/updates/(?P<username>[\w.-]+)/(?P<device_uid>[\w.-]+)\.json', 'updates'),
35 (r'^api/2/settings/(?P<username>[\w.-]+)/(?P<scope>account|device|podcast|episode)\.json', 'settings.main'),
36 (r'^api/2/favorites/(?P<username>[\w.-]+).json', 'favorites'),
38 (r'^api/2/lists/(?P<username>[\w.-]+)/create\.(?P<format>\w+)', 'lists.create'),
39 (r'^api/2/lists/(?P<username>[\w.-]+)\.json', 'lists.get_lists'),
40 url(r'^api/2/lists/(?P<username>[\w.-]+)/list/(?P<listname>[\w-]+)\.(?P<format>\w+)', 'lists.podcast_list', name='api-get-list'),
42 (r'^api/2/sync-devices/(?P<username>\w+)\.json', 'sync.main'),