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/nearby' => 'changeset#list', :nearby => true
108 match '/browse/changesets' => 'changeset#list'
109 match '/browse/changesets/feed' => 'changeset#feed', :format => :atom
110 match '/browse/note/:id' => 'browse#note', :id => /\d+/
111 match '/user/:display_name/notes' => 'note#mine'
112 match '/browse' => 'changeset#list'
115 root :to => 'site#index'
116 match '/edit' => 'site#edit'
117 match '/copyright/:copyright_locale' => 'site#copyright'
118 match '/copyright' => 'site#copyright'
119 match '/history' => 'changeset#list'
120 match '/history/feed' => 'changeset#feed', :format => :atom
121 match '/export' => 'site#export'
122 match '/login' => 'user#login'
123 match '/logout' => 'user#logout'
124 match '/offline' => 'site#offline'
125 match '/key' => 'site#key'
126 match '/user/new' => 'user#new'
127 match '/user/terms' => 'user#terms'
128 match '/user/save' => 'user#save'
129 match '/user/:display_name/confirm/resend' => 'user#confirm_resend'
130 match '/user/:display_name/confirm' => 'user#confirm'
131 match '/user/confirm' => 'user#confirm'
132 match '/user/confirm-email' => 'user#confirm_email'
133 match '/user/go_public' => 'user#go_public'
134 match '/user/reset-password' => 'user#reset_password'
135 match '/user/forgot-password' => 'user#lost_password'
136 match '/user/suspended' => 'user#suspended'
138 match '/index.html' => 'site#index'
139 match '/edit.html' => 'site#edit'
140 match '/export.html' => 'site#export'
141 match '/login.html' => 'user#login'
142 match '/logout.html' => 'user#logout'
143 match '/create-account.html' => 'user#new'
144 match '/forgot-password.html' => 'user#lost_password'
147 match '/go/:code' => 'site#permalink', :code => /[a-zA-Z0-9_@~]+[=-]*/
150 match '/user/:display_name/traces/tag/:tag/page/:page' => 'trace#list'
151 match '/user/:display_name/traces/tag/:tag' => 'trace#list'
152 match '/user/:display_name/traces/page/:page' => 'trace#list'
153 match '/user/:display_name/traces' => 'trace#list'
154 match '/user/:display_name/traces/tag/:tag/rss' => 'trace#georss'
155 match '/user/:display_name/traces/rss' => 'trace#georss'
156 match '/user/:display_name/traces/:id' => 'trace#view'
157 match '/user/:display_name/traces/:id/picture' => 'trace#picture'
158 match '/user/:display_name/traces/:id/icon' => 'trace#icon'
159 match '/traces/tag/:tag/page/:page' => 'trace#list'
160 match '/traces/tag/:tag' => 'trace#list'
161 match '/traces/page/:page' => 'trace#list'
162 match '/traces' => 'trace#list'
163 match '/traces/tag/:tag/rss' => 'trace#georss'
164 match '/traces/rss' => 'trace#georss'
165 match '/traces/mine/tag/:tag/page/:page' => 'trace#mine'
166 match '/traces/mine/tag/:tag' => 'trace#mine'
167 match '/traces/mine/page/:page' => 'trace#mine'
168 match '/traces/mine' => 'trace#mine'
169 match '/trace/create' => 'trace#create'
170 match '/trace/:id/data' => 'trace#data'
171 match '/trace/:id/data.:format' => 'trace#data'
172 match '/trace/:id/edit' => 'trace#edit'
173 match '/trace/:id/delete' => 'trace#delete'
176 match '/diary/new' => 'diary_entry#new'
177 match '/diary/friends' => 'diary_entry#list', :friends => true
178 match '/diary/nearby' => 'diary_entry#list', :nearby => true
179 match '/user/:display_name/diary/rss' => 'diary_entry#rss', :format => :rss
180 match '/diary/:language/rss' => 'diary_entry#rss', :format => :rss
181 match '/diary/rss' => 'diary_entry#rss', :format => :rss
182 match '/user/:display_name/diary/comments/:page' => 'diary_entry#comments', :page => /\d+/
183 match '/user/:display_name/diary/comments/' => 'diary_entry#comments'
184 match '/user/:display_name/diary' => 'diary_entry#list'
185 match '/diary/:language' => 'diary_entry#list'
186 match '/diary' => 'diary_entry#list'
187 match '/user/:display_name/diary/:id' => 'diary_entry#view', :id => /\d+/
188 match '/user/:display_name/diary/:id/newcomment' => 'diary_entry#comment', :id => /\d+/
189 match '/user/:display_name/diary/:id/edit' => 'diary_entry#edit', :id => /\d+/
190 match '/user/:display_name/diary/:id/hide' => 'diary_entry#hide', :id => /\d+/
191 match '/user/:display_name/diary/:id/hidecomment/:comment' => 'diary_entry#hidecomment', :id => /\d+/, :comment => /\d+/
194 match '/user/:display_name' => 'user#view'
195 match '/user/:display_name/make_friend' => 'user#make_friend'
196 match '/user/:display_name/remove_friend' => 'user#remove_friend'
197 match '/user/:display_name/account' => 'user#account'
198 match '/user/:display_name/set_status' => 'user#set_status'
199 match '/user/:display_name/delete' => 'user#delete'
202 match '/users' => 'user#list'
203 match '/users/:status' => 'user#list'
206 match '/test/populate/:table/:from/:count' => 'test#populate'
207 match '/test/populate/:table/:count' => 'test#populate', :from => 1
210 match '/geocoder/search' => 'geocoder#search'
211 match '/geocoder/search_latlon' => 'geocoder#search_latlon'
212 match '/geocoder/search_us_postcode' => 'geocoder#search_us_postcode'
213 match '/geocoder/search_uk_postcode' => 'geocoder#search_uk_postcode'
214 match '/geocoder/search_ca_postcode' => 'geocoder#search_ca_postcode'
215 match '/geocoder/search_osm_namefinder' => 'geocoder#search_osm_namefinder'
216 match '/geocoder/search_osm_nominatim' => 'geocoder#search_osm_nominatim'
217 match '/geocoder/search_geonames' => 'geocoder#search_geonames'
218 match '/geocoder/description' => 'geocoder#description'
219 match '/geocoder/description_osm_namefinder' => 'geocoder#description_osm_namefinder'
220 match '/geocoder/description_osm_nominatim' => 'geocoder#description_osm_nominatim'
221 match '/geocoder/description_geonames' => 'geocoder#description_geonames'
224 match '/export/start' => 'export#start'
225 match '/export/finish' => 'export#finish'
228 match '/user/:display_name/inbox' => 'message#inbox'
229 match '/user/:display_name/outbox' => 'message#outbox'
230 match '/message/new/:display_name' => 'message#new'
231 match '/message/read/:message_id' => 'message#read'
232 match '/message/mark/:message_id' => 'message#mark'
233 match '/message/reply/:message_id' => 'message#reply'
234 match '/message/delete/:message_id' => 'message#delete'
236 # oauth admin pages (i.e: for setting up new clients, etc...)
237 scope "/user/:display_name" do
238 resources :oauth_clients
240 match '/oauth/revoke' => 'oauth#revoke'
241 match '/oauth/authorize' => 'oauth#authorize', :as => :authorize
242 match '/oauth/token' => 'oauth#token', :as => :token
243 match '/oauth/request_token' => 'oauth#request_token', :as => :request_token
244 match '/oauth/access_token' => 'oauth#access_token', :as => :access_token
245 match '/oauth/test_request' => 'oauth#test_request', :as => :test_request
247 # roles and banning pages
248 match '/user/:display_name/role/:role/grant' => 'user_roles#grant'
249 match '/user/:display_name/role/:role/revoke' => 'user_roles#revoke'
250 match '/user/:display_name/blocks' => 'user_blocks#blocks_on'
251 match '/user/:display_name/blocks_by' => 'user_blocks#blocks_by'
252 match '/blocks/new/:display_name' => 'user_blocks#new'
253 resources :user_blocks
254 match '/blocks/:id/revoke' => 'user_blocks#revoke'
257 match ':controller/:id/:action' => '#index'
258 match ':controller/:action' => '#index'