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
74 match 'api/0.6/amf/read' => 'amf#amf_read'
75 match 'api/0.6/amf/write' => 'amf#amf_write'
76 match 'api/0.6/swf/trackpoints' => 'swf#trackpoints'
79 match '/browse/start' => 'browse#start'
80 match '/browse/way/:id' => 'browse#way', :id => /\d+/
81 match '/browse/way/:id/history' => 'browse#way_history', :id => /\d+/
82 match '/browse/node/:id' => 'browse#node', :id => /\d+/
83 match '/browse/node/:id/history' => 'browse#node_history', :id => /\d+/
84 match '/browse/relation/:id' => 'browse#relation', :id => /\d+/
85 match '/browse/relation/:id/history' => 'browse#relation_history', :id => /\d+/
86 match '/browse/changeset/:id' => 'browse#changeset', :as => :changeset, :id => /\d+/
87 match '/user/:display_name/edits' => 'changeset#list'
88 match '/user/:display_name/edits/feed' => 'changeset#list', :format => :atom
89 match '/browse/changesets' => 'changeset#list'
90 match '/browse/changesets/feed' => 'changeset#list', :format => :atom
91 match '/browse' => 'changeset#list'
94 match '/' => 'site#index'
95 match '/edit' => 'site#edit'
96 match '/copyright' => 'site#copyright'
97 match '/copyright/:copyright_locale' => 'site#copyright'
98 match '/history' => 'changeset#list'
99 match '/history/feed' => 'changeset#list', :format => :atom
100 match '/export' => 'site#export'
101 match '/login' => 'user#login'
102 match '/logout' => 'user#logout'
103 match '/offline' => 'site#offline'
104 match '/key' => 'site#key'
105 match '/user/new' => 'user#new'
106 match '/user/terms' => 'user#terms'
107 match '/user/save' => 'user#save'
108 match '/user/:display_name/confirm/resend' => 'user#confirm_resend'
109 match '/user/:display_name/confirm' => 'user#confirm'
110 match '/user/confirm' => 'user#confirm'
111 match '/user/confirm-email' => 'user#confirm_email'
112 match '/user/go_public' => 'user#go_public'
113 match '/user/reset-password' => 'user#reset_password'
114 match '/user/forgot-password' => 'user#lost_password'
115 match '/user/suspended' => 'user#suspended'
117 match '/index.html' => 'site#index'
118 match '/edit.html' => 'site#edit'
119 match '/export.html' => 'site#export'
120 match '/login.html' => 'user#login'
121 match '/logout.html' => 'user#logout'
122 match '/create-account.html' => 'user#new'
123 match '/forgot-password.html' => 'user#lost_password'
126 match '/go/:code' => 'site#permalink', :code => /[a-zA-Z0-9_@]+[=-]*/
129 match '/user/:display_name/traces/tag/:tag/page/:page' => 'trace#list'
130 match '/user/:display_name/traces/tag/:tag' => 'trace#list'
131 match '/user/:display_name/traces/page/:page' => 'trace#list'
132 match '/user/:display_name/traces' => 'trace#list'
133 match '/user/:display_name/traces/tag/:tag/rss' => 'trace#georss'
134 match '/user/:display_name/traces/rss' => 'trace#georss'
135 match '/user/:display_name/traces/:id' => 'trace#view'
136 match '/user/:display_name/traces/:id/picture' => 'trace#picture'
137 match '/user/:display_name/traces/:id/icon' => 'trace#icon'
138 match '/traces/tag/:tag/page/:page' => 'trace#list'
139 match '/traces/tag/:tag' => 'trace#list'
140 match '/traces/page/:page' => 'trace#list'
141 match '/traces' => 'trace#list'
142 match '/traces/tag/:tag/rss' => 'trace#georss'
143 match '/traces/rss' => 'trace#georss'
144 match '/traces/mine/tag/:tag/page/:page' => 'trace#mine'
145 match '/traces/mine/tag/:tag' => 'trace#mine'
146 match '/traces/mine/page/:page' => 'trace#mine'
147 match '/traces/mine' => 'trace#mine'
148 match '/trace/create' => 'trace#create'
149 match '/trace/:id/data' => 'trace#data'
150 match '/trace/:id/data.:format' => 'trace#data'
151 match '/trace/:id/edit' => 'trace#edit'
152 match '/trace/:id/delete' => 'trace#delete'
155 match '/diary/new' => 'diary_entry#new'
156 match '/user/:display_name/diary/rss' => 'diary_entry#rss', :format => :rss
157 match '/diary/:language/rss' => 'diary_entry#rss', :format => :rss
158 match '/diary/rss' => 'diary_entry#rss', :format => :rss
159 match '/user/:display_name/diary' => 'diary_entry#list'
160 match '/diary/:language' => 'diary_entry#list'
161 match '/diary' => 'diary_entry#list'
162 match '/user/:display_name/diary/:id' => 'diary_entry#view', :id => /\d+/
163 match '/user/:display_name/diary/:id/newcomment' => 'diary_entry#comment', :id => /\d+/
164 match '/user/:display_name/diary/:id/edit' => 'diary_entry#edit', :id => /\d+/
165 match '/user/:display_name/diary/:id/hide' => 'diary_entry#hide', :id => /\d+/
166 match '/user/:display_name/diary/:id/hidecomment/:comment' => 'diary_entry#hidecomment', :id => /\d+/, :comment => /\d+/
169 match '/user/:display_name' => 'user#view'
170 match '/user/:display_name/make_friend' => 'user#make_friend'
171 match '/user/:display_name/remove_friend' => 'user#remove_friend'
172 match '/user/:display_name/account' => 'user#account'
173 match '/user/:display_name/set_status' => 'user#set_status'
174 match '/user/:display_name/delete' => 'user#delete'
177 match '/users' => 'user#list'
178 match '/users/:status' => 'user#list'
181 match '/test/populate/:table/:from/:count' => 'test#populate'
182 match '/test/populate/:table/:count' => 'test#populate', :from => 1
185 match '/geocoder/search' => 'geocoder#search'
186 match '/geocoder/search_latlon' => 'geocoder#search_latlon'
187 match '/geocoder/search_us_postcode' => 'geocoder#search_us_postcode'
188 match '/geocoder/search_uk_postcode' => 'geocoder#search_uk_postcode'
189 match '/geocoder/search_ca_postcode' => 'geocoder#search_ca_postcode'
190 match '/geocoder/search_osm_namefinder' => 'geocoder#search_osm_namefinder'
191 match '/geocoder/search_osm_nominatim' => 'geocoder#search_osm_nominatim'
192 match '/geocoder/search_geonames' => 'geocoder#search_geonames'
193 match '/geocoder/description' => 'geocoder#description'
194 match '/geocoder/description_osm_namefinder' => 'geocoder#description_osm_namefinder'
195 match '/geocoder/description_osm_nominatim' => 'geocoder#description_osm_nominatim'
196 match '/geocoder/description_geonames' => 'geocoder#description_geonames'
199 match '/export/start' => 'export#start'
200 match '/export/finish' => 'export#finish'
203 match '/user/:display_name/inbox' => 'message#inbox'
204 match '/user/:display_name/outbox' => 'message#outbox'
205 match '/message/new/:display_name' => 'message#new'
206 match '/message/read/:message_id' => 'message#read'
207 match '/message/mark/:message_id' => 'message#mark'
208 match '/message/reply/:message_id' => 'message#reply'
209 match '/message/delete/:message_id' => 'message#delete'
211 # oauth admin pages (i.e: for setting up new clients, etc...)
212 scope "/user/:display_name" do
213 resources :oauth_clients
215 match '/oauth/revoke' => 'oauth#revoke'
216 match '/oauth/authorize' => 'oauth#oauthorize', :as => :authorize
217 match '/oauth/request_token' => 'oauth#request_token', :as => :request_token
218 match '/oauth/access_token' => 'oauth#access_token', :as => :access_token
219 match '/oauth/test_request' => 'oauth#test_request', :as => :test_request
221 # roles and banning pages
222 match '/user/:display_name/role/:role/grant' => 'user_roles#grant'
223 match '/user/:display_name/role/:role/revoke' => 'user_roles#revoke'
224 match '/user/:display_name/blocks' => 'user_blocks#blocks_on'
225 match '/user/:display_name/blocks_by' => 'user_blocks#blocks_by'
226 match '/blocks/new/:display_name' => 'user_blocks#new'
227 resources :user_blocks
228 match '/blocks/:id/revoke' => 'user_blocks#revoke'
231 match ':controller/:id/:action' => '#index'
232 match ':controller/:action' => '#index'