1 from django
.conf
.urls
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 from mygpo
.api
.advanced
import DeviceUpdates
21 urlpatterns
+= patterns('mygpo.api.advanced',
22 (r
'^api/[12]/subscriptions/(?P<username>[\w.-]+)/(?P<device_uid>[\w.-]+)\.json', 'subscriptions'),
23 (r
'^api/(?P<version>[12])/episodes/(?P<username>[\w.-]+)\.json', 'episodes'),
24 (r
'^api/[12]/devices/(?P<username>[\w.-]+)/(?P<device_uid>[\w.-]+)\.json', 'device'),
25 (r
'^api/[12]/devices/(?P<username>[\w.-]+)\.json', 'devices'),
27 (r
'^api/2/auth/(?P<username>[\w.-]+)/login\.json', 'auth.login'),
28 (r
'^api/2/auth/(?P<username>[\w.-]+)/logout\.json', 'auth.logout'),
29 (r
'^api/2/tags/(?P<count>\d+)\.json', 'directory.top_tags'),
30 (r
'^api/2/tag/(?P<tag>[^/]+)/(?P<count>\d+)\.json', 'directory.tag_podcasts'),
31 (r
'^api/2/data/podcast\.json', 'directory.podcast_info'),
32 (r
'^api/2/data/episode\.json', 'directory.episode_info'),
34 (r
'^api/2/chapters/(?P<username>[\w.-]+)\.json', 'episode.chapters'),
35 (r
'^api/2/updates/(?P<username>[\w.-]+)/(?P<device_uid>[\w.-]+)\.json',
36 DeviceUpdates
.as_view()),
38 (r
'^api/2/settings/(?P<username>[\w.-]+)/(?P<scope>account|device|podcast|episode)\.json', 'settings.main'),
39 (r
'^api/2/favorites/(?P<username>[\w.-]+).json', 'favorites'),
41 (r
'^api/2/lists/(?P<username>[\w.-]+)/create\.(?P<format>\w+)', 'lists.create'),
42 (r
'^api/2/lists/(?P<username>[\w.-]+)\.json', 'lists.get_lists'),
43 url(r
'^api/2/lists/(?P<username>[\w.-]+)/list/(?P<listname>[\w-]+)\.(?P<format>\w+)', 'lists.podcast_list', name
='api-get-list'),
45 (r
'^api/2/sync-devices/(?P<username>\w+)\.json', 'sync.main'),