Setting 0.8.2.dev in configure.ac as well
[larjonas-mediagoblin.git] / mediagoblin / api / routing.py
blobea231b6337f06f639ef439e54b5dc92f4e0bebb7
1 # GNU MediaGoblin -- federated, autonomous media hosting
2 # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU Affero General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Affero General Public License for more details.
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 from mediagoblin.tools.routing import add_route
19 # Add user profile
20 add_route(
21 "media.api.user",
22 "/api/user/<string:username>/",
23 "mediagoblin.api.views:user_endpoint",
24 match_slash=False
27 add_route(
28 "mediagoblin.api.user.profile",
29 "/api/user/<string:username>/profile/",
30 "mediagoblin.api.views:profile_endpoint",
31 match_slash=False
34 # Inbox and Outbox (feed)
35 add_route(
36 "mediagoblin.api.feed",
37 "/api/user/<string:username>/feed/",
38 "mediagoblin.api.views:feed_endpoint",
39 match_slash=False
42 add_route(
43 "mediagoblin.api.feed_major",
44 "/api/user/<string:username>/feed/major/",
45 "mediagoblin.api.views:feed_major_endpoint",
46 match_slash=False
49 add_route(
50 "mediagoblin.api.feed_minor",
51 "/api/user/<string:username>/feed/minor/",
52 "mediagoblin.api.views:feed_minor_endpoint",
53 match_slash=False
56 add_route(
57 "mediagoblin.api.user.uploads",
58 "/api/user/<string:username>/uploads/",
59 "mediagoblin.api.views:uploads_endpoint",
60 match_slash=False
63 add_route(
64 "mediagoblin.api.inbox",
65 "/api/user/<string:username>/inbox/",
66 "mediagoblin.api.views:inbox_endpoint",
67 match_slash=False
70 add_route(
71 "mediagoblin.api.inbox_minor",
72 "/api/user/<string:username>/inbox/minor/",
73 "mediagoblin.api.views:inbox_minor_endpoint",
74 match_slash=False
77 add_route(
78 "mediagoblin.api.inbox_major",
79 "/api/user/<string:username>/inbox/major/",
80 "mediagoblin.api.views:inbox_major_endpoint",
81 match_slash=False
84 add_route(
85 "mediagoblin.api.inbox_direct",
86 "/api/user/<string:username>/inbox/direct/",
87 "mediagoblin.api.views:inbox_endpoint",
88 match_slash=False
91 add_route(
92 "mediagoblin.api.inbox_direct_minor",
93 "/api/user/<string:username>/inbox/direct/minor/",
94 "mediagoblin.api.views:inbox_minor_endpoint",
95 match_slash=False
98 add_route(
99 "mediagoblin.api.inbox_direct_major",
100 "/api/user/<string:username>/inbox/direct/major/",
101 "mediagoblin.api.views:inbox_major_endpoint",
102 match_slash=False
105 # object endpoints
106 add_route(
107 "mediagoblin.api.object",
108 "/api/<string:object_type>/<string:id>/",
109 "mediagoblin.api.views:object_endpoint",
110 match_slash=False
113 add_route(
114 "mediagoblin.api.object.comments",
115 "/api/<string:object_type>/<string:id>/comments/",
116 "mediagoblin.api.views:object_comments",
117 match_slash=False
120 add_route(
121 "mediagoblin.webfinger.well-known.host-meta",
122 "/.well-known/host-meta",
123 "mediagoblin.api.views:host_meta"
126 add_route(
127 "mediagoblin.webfinger.well-known.host-meta.json",
128 "/.well-known/host-meta.json",
129 "mediagoblin.api.views:host_meta"
132 add_route(
133 "mediagoblin.webfinger.well-known.webfinger",
134 "/.well-known/webfinger/",
135 "mediagoblin.api.views:lrdd_lookup",
136 match_slash=False
139 add_route(
140 "mediagoblin.webfinger.whoami",
141 "/api/whoami/",
142 "mediagoblin.api.views:whoami",
143 match_slash=False