1 OpenStreetMap::Application.routes.draw do
3 match 'api/capabilities' => 'api#capabilities'
4 match 'api/0.6/capabilities' => 'api#capabilities'
6 match 'api/0.6/changeset/create' => 'changeset#create'
7 match 'api/0.6/changeset/:id/upload' => 'changeset#upload', :id => /\d+/
8 match 'api/0.6/changeset/:id/download' => 'changeset#download', :as => :changeset_download, :id => /\d+/
9 match 'api/0.6/changeset/:id/expand_bbox' => 'changeset#expand_bbox', :id => /\d+/
10 match 'api/0.6/changeset/:id' => 'changeset#read', :as => :changeset_read, :via => :get, :id => /\d+/
11 match 'api/0.6/changeset/:id' => 'changeset#update', :via => :put, :id => /\d+/
12 match 'api/0.6/changeset/:id/close' => 'changeset#close', :id => /\d+/
13 match 'api/0.6/changesets' => 'changeset#query', :id => nil
15 match 'api/0.6/node/create' => 'node#create'
16 match 'api/0.6/node/:id/ways' => 'way#ways_for_node', :id => /\d+/
17 match 'api/0.6/node/:id/relations' => 'relation#relations_for_node', :id => /\d+/
18 match 'api/0.6/node/:id/history' => 'old_node#history', :id => /\d+/
19 match 'api/0.6/node/:id/:version' => 'old_node#version', :version => /\d+/, :id => /\d+/
20 match 'api/0.6/node/:id' => 'node#read', :via => :get, :id => /\d+/
21 match 'api/0.6/node/:id' => 'node#update', :via => :put, :id => /\d+/
22 match 'api/0.6/node/:id' => 'node#delete', :via => :delete, :id => /\d+/
23 match 'api/0.6/nodes' => 'node#nodes', :id => nil
25 match 'api/0.6/way/create' => 'way#create'
26 match 'api/0.6/way/:id/history' => 'old_way#history', :id => /\d+/
27 match 'api/0.6/way/:id/full' => 'way#full', :id => /\d+/
28 match 'api/0.6/way/:id/relations' => 'relation#relations_for_way', :id => /\d+/
29 match 'api/0.6/way/:id/:version' => 'old_way#version', :version => /\d+/, :id => /\d+/
30 match 'api/0.6/way/:id' => 'way#read', :via => :get, :id => /\d+/
31 match 'api/0.6/way/:id' => 'way#update', :via => :put, :id => /\d+/
32 match 'api/0.6/way/:id' => 'way#delete', :via => :delete, :id => /\d+/
33 match 'api/0.6/ways' => 'way#ways', :id => nil
35 match 'api/0.6/relation/create' => 'relation#create'
36 match 'api/0.6/relation/:id/relations' => 'relation#relations_for_relation', :id => /\d+/
37 match 'api/0.6/relation/:id/history' => 'old_relation#history', :id => /\d+/
38 match 'api/0.6/relation/:id/full' => 'relation#full', :id => /\d+/
39 match 'api/0.6/relation/:id/:version' => 'old_relation#version', :version => /\d+/, :id => /\d+/
40 match 'api/0.6/relation/:id' => 'relation#read', :via => :get, :id => /\d+/
41 match 'api/0.6/relation/:id' => 'relation#update', :via => :put, :id => /\d+/
42 match 'api/0.6/relation/:id' => 'relation#delete', :via => :delete, :id => /\d+/
43 match 'api/0.6/relations' => 'relation#relations'
45 match 'api/0.6/map' => 'api#map'
47 match 'api/0.6/trackpoints' => 'api#trackpoints'
49 match 'api/0.6/changes' => 'api#changes'
51 match 'api/0.6/search' => 'search#search_all'
52 match 'api/0.6/ways/search' => 'search#search_ways'
53 match 'api/0.6/relations/search' => 'search#search_relations'
54 match 'api/0.6/nodes/search' => 'search#search_nodes'
56 match 'api/0.6/user/details' => 'user#api_details'
57 match 'api/0.6/user/preferences' => 'user_preference#read', :via => :get
58 match 'api/0.6/user/preferences/:preference_key' => 'user_preference#read_one', :via => :get
59 match 'api/0.6/user/preferences' => 'user_preference#update', :via => :put
60 match 'api/0.6/user/preferences/:preference_key' => 'user_preference#update_one', :via => :put
61 match 'api/0.6/user/preferences/:preference_key' => 'user_preference#delete_one', :via => :delete
62 match 'api/0.6/user/gpx_files' => 'user#api_gpx_files'
64 match 'api/0.6/gpx/create' => 'trace#api_create'
65 match 'api/0.6/gpx/:id' => 'trace#api_read', :via => :get, :id => /\d+/
66 match 'api/0.6/gpx/:id' => 'trace#api_update', :via => :put, :id => /\d+/
67 match 'api/0.6/gpx/:id' => 'trace#api_delete', :via => :delete, :id => /\d+/
68 match 'api/0.6/gpx/:id/details' => 'trace#api_read', :id => /\d+/
69 match 'api/0.6/gpx/:id/data' => 'trace#api_data'
70 match 'api/0.6/gpx/:id/data.:format' => 'trace#api_data'
72 # AMF (ActionScript) API
73 match 'api/0.6/amf/read' => 'amf#amf_read'
74 match 'api/0.6/amf/write' => 'amf#amf_write'
75 match 'api/0.6/swf/trackpoints' => 'swf#trackpoints'
78 match 'api/0.6/notes' => 'note#list'
79 match 'api/0.6/notes.:format' => 'note#list'
80 match 'api/0.6/notes/search' => 'note#search'
81 match 'api/0.6/notes/rss' => 'notes#rss'
82 match 'api/0.6/note/create' => 'note#create'
83 match 'api/0.6/note/:id/comment' => 'note#update', :id => /\d+/
84 match 'api/0.6/note/:id/close' => 'note#close', :id => /\d+/
85 match 'api/0.6/note/:id' => 'note#read', :via => :get, :id => /\d+/
86 match 'api/0.6/note/:id.:format' => 'note#read', :via => :get, :id => /\d+/
87 match 'api/0.6/note/:id' => 'note#delete', :via => :delete, :id => /\d+/
88 match 'api/0.6/notes/getBugs' => 'note#list'
89 match 'api/0.6/notes/addPOIexec' => 'note#create'
90 match 'api/0.6/notes/closePOIexec' => 'note#close'
91 match 'api/0.6/notes/editPOIexec' => 'note#update'
92 match 'api/0.6/notes/getGPX' => 'note#list', :format => :gpx
93 match 'api/0.6/notes/getRSSfeed' => 'note#rss'
96 match '/browse/start' => 'browse#start'
97 match '/browse/way/:id' => 'browse#way', :id => /\d+/
98 match '/browse/way/:id/history' => 'browse#way_history', :id => /\d+/
99 match '/browse/node/:id' => 'browse#node', :id => /\d+/
100 match '/browse/node/:id/history' => 'browse#node_history', :id => /\d+/
101 match '/browse/relation/:id' => 'browse#relation', :id => /\d+/
102 match '/browse/relation/:id/history' => 'browse#relation_history', :id => /\d+/
103 match '/browse/changeset/:id' => 'browse#changeset', :as => :changeset, :id => /\d+/
104 match '/user/:display_name/edits' => 'changeset#list'
105 match '/user/:display_name/edits/feed' => 'changeset#feed', :format => :atom
106 match '/browse/friends' => 'changeset#list', :friends => true
107 match '/browse/changesets' => 'changeset#list'
108 match '/browse/changesets/feed' => 'changeset#feed', :format => :atom
109 match '/browse/note/:id' => 'browse#note', :id => /\d+/
110 match '/user/:display_name/notes' => 'note#mine'
111 match '/browse' => 'changeset#list'
114 match '/' => 'site#index'
115 match '/edit' => 'site#edit'
116 match '/copyright' => 'site#copyright'
117 match '/copyright/:copyright_locale' => 'site#copyright'
118 match '/history' => 'changeset#list'
119 match '/history/feed' => 'changeset#feed', :format => :atom
120 match '/export' => 'site#export'
121 match '/login' => 'user#login'
122 match '/logout' => 'user#logout'
123 match '/offline' => 'site#offline'
124 match '/key' => 'site#key'
125 match '/user/new' => 'user#new'
126 match '/user/terms' => 'user#terms'
127 match '/user/save' => 'user#save'
128 match '/user/:display_name/confirm/resend' => 'user#confirm_resend'
129 match '/user/:display_name/confirm' => 'user#confirm'
130 match '/user/confirm' => 'user#confirm'
131 match '/user/confirm-email' => 'user#confirm_email'
132 match '/user/go_public' => 'user#go_public'
133 match '/user/reset-password' => 'user#reset_password'
134 match '/user/forgot-password' => 'user#lost_password'
135 match '/user/suspended' => 'user#suspended'
137 match '/index.html' => 'site#index'
138 match '/edit.html' => 'site#edit'
139 match '/export.html' => 'site#export'
140 match '/login.html' => 'user#login'
141 match '/logout.html' => 'user#logout'
142 match '/create-account.html' => 'user#new'
143 match '/forgot-password.html' => 'user#lost_password'
146 match '/go/:code' => 'site#permalink', :code => /[a-zA-Z0-9_@~]+[=-]*/
149 match '/user/:display_name/traces/tag/:tag/page/:page' => 'trace#list'
150 match '/user/:display_name/traces/tag/:tag' => 'trace#list'
151 match '/user/:display_name/traces/page/:page' => 'trace#list'
152 match '/user/:display_name/traces' => 'trace#list'
153 match '/user/:display_name/traces/tag/:tag/rss' => 'trace#georss'
154 match '/user/:display_name/traces/rss' => 'trace#georss'
155 match '/user/:display_name/traces/:id' => 'trace#view'
156 match '/user/:display_name/traces/:id/picture' => 'trace#picture'
157 match '/user/:display_name/traces/:id/icon' => 'trace#icon'
158 match '/traces/tag/:tag/page/:page' => 'trace#list'
159 match '/traces/tag/:tag' => 'trace#list'
160 match '/traces/page/:page' => 'trace#list'
161 match '/traces' => 'trace#list'
162 match '/traces/tag/:tag/rss' => 'trace#georss'
163 match '/traces/rss' => 'trace#georss'
164 match '/traces/mine/tag/:tag/page/:page' => 'trace#mine'
165 match '/traces/mine/tag/:tag' => 'trace#mine'
166 match '/traces/mine/page/:page' => 'trace#mine'
167 match '/traces/mine' => 'trace#mine'
168 match '/trace/create' => 'trace#create'
169 match '/trace/:id/data' => 'trace#data'
170 match '/trace/:id/data.:format' => 'trace#data'
171 match '/trace/:id/edit' => 'trace#edit'
172 match '/trace/:id/delete' => 'trace#delete'
175 match '/diary/new' => 'diary_entry#new'
176 match '/user/:display_name/diary/rss' => 'diary_entry#rss', :format => :rss
177 match '/diary/:language/rss' => 'diary_entry#rss', :format => :rss
178 match '/diary/rss' => 'diary_entry#rss', :format => :rss
179 match '/user/:display_name/diary' => 'diary_entry#list'
180 match '/diary/:language' => 'diary_entry#list'
181 match '/diary' => 'diary_entry#list'
182 match '/user/:display_name/diary/:id' => 'diary_entry#view', :id => /\d+/
183 match '/user/:display_name/diary/:id/newcomment' => 'diary_entry#comment', :id => /\d+/
184 match '/user/:display_name/diary/:id/edit' => 'diary_entry#edit', :id => /\d+/
185 match '/user/:display_name/diary/:id/hide' => 'diary_entry#hide', :id => /\d+/
186 match '/user/:display_name/diary/:id/hidecomment/:comment' => 'diary_entry#hidecomment', :id => /\d+/, :comment => /\d+/
189 match '/user/:display_name' => 'user#view'
190 match '/user/:display_name/make_friend' => 'user#make_friend'
191 match '/user/:display_name/remove_friend' => 'user#remove_friend'
192 match '/user/:display_name/account' => 'user#account'
193 match '/user/:display_name/set_status' => 'user#set_status'
194 match '/user/:display_name/delete' => 'user#delete'
197 match '/users' => 'user#list'
198 match '/users/:status' => 'user#list'
201 match '/test/populate/:table/:from/:count' => 'test#populate'
202 match '/test/populate/:table/:count' => 'test#populate', :from => 1
205 match '/geocoder/search' => 'geocoder#search'
206 match '/geocoder/search_latlon' => 'geocoder#search_latlon'
207 match '/geocoder/search_us_postcode' => 'geocoder#search_us_postcode'
208 match '/geocoder/search_uk_postcode' => 'geocoder#search_uk_postcode'
209 match '/geocoder/search_ca_postcode' => 'geocoder#search_ca_postcode'
210 match '/geocoder/search_osm_namefinder' => 'geocoder#search_osm_namefinder'
211 match '/geocoder/search_osm_nominatim' => 'geocoder#search_osm_nominatim'
212 match '/geocoder/search_geonames' => 'geocoder#search_geonames'
213 match '/geocoder/description' => 'geocoder#description'
214 match '/geocoder/description_osm_namefinder' => 'geocoder#description_osm_namefinder'
215 match '/geocoder/description_osm_nominatim' => 'geocoder#description_osm_nominatim'
216 match '/geocoder/description_geonames' => 'geocoder#description_geonames'
219 match '/export/start' => 'export#start'
220 match '/export/finish' => 'export#finish'
223 match '/user/:display_name/inbox' => 'message#inbox'
224 match '/user/:display_name/outbox' => 'message#outbox'
225 match '/message/new/:display_name' => 'message#new'
226 match '/message/read/:message_id' => 'message#read'
227 match '/message/mark/:message_id' => 'message#mark'
228 match '/message/reply/:message_id' => 'message#reply'
229 match '/message/delete/:message_id' => 'message#delete'
231 # oauth admin pages (i.e: for setting up new clients, etc...)
232 scope "/user/:display_name" do
233 resources :oauth_clients
235 match '/oauth/revoke' => 'oauth#revoke'
236 match '/oauth/authorize' => 'oauth#authorize', :as => :authorize
237 match '/oauth/token' => 'oauth#token', :as => :token
238 match '/oauth/request_token' => 'oauth#request_token', :as => :request_token
239 match '/oauth/access_token' => 'oauth#access_token', :as => :access_token
240 match '/oauth/test_request' => 'oauth#test_request', :as => :test_request
242 # roles and banning pages
243 match '/user/:display_name/role/:role/grant' => 'user_roles#grant'
244 match '/user/:display_name/role/:role/revoke' => 'user_roles#revoke'
245 match '/user/:display_name/blocks' => 'user_blocks#blocks_on'
246 match '/user/:display_name/blocks_by' => 'user_blocks#blocks_by'
247 match '/blocks/new/:display_name' => 'user_blocks#new'
248 resources :user_blocks
249 match '/blocks/:id/revoke' => 'user_blocks#revoke'
252 match ':controller/:id/:action' => '#index'
253 match ':controller/:action' => '#index'