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#feed', :format => :atom
89 match '/browse/friends' => 'changeset#list', :friends => true
90 match '/browse/nearby' => 'changeset#list', :nearby => true
91 match '/browse/changesets' => 'changeset#list'
92 match '/browse/changesets/feed' => 'changeset#feed', :format => :atom
93 match '/browse' => 'changeset#list'
96 root :to => 'site#index'
97 match '/edit' => 'site#edit'
98 match '/copyright/:copyright_locale' => 'site#copyright'
99 match '/copyright' => 'site#copyright'
100 match '/history' => 'changeset#list'
101 match '/history/feed' => 'changeset#feed', :format => :atom
102 match '/export' => 'site#export'
103 match '/login' => 'user#login'
104 match '/logout' => 'user#logout'
105 match '/offline' => 'site#offline'
106 match '/key' => 'site#key'
107 match '/user/new' => 'user#new'
108 match '/user/terms' => 'user#terms'
109 match '/user/save' => 'user#save'
110 match '/user/:display_name/confirm/resend' => 'user#confirm_resend'
111 match '/user/:display_name/confirm' => 'user#confirm'
112 match '/user/confirm' => 'user#confirm'
113 match '/user/confirm-email' => 'user#confirm_email'
114 match '/user/go_public' => 'user#go_public'
115 match '/user/reset-password' => 'user#reset_password'
116 match '/user/forgot-password' => 'user#lost_password'
117 match '/user/suspended' => 'user#suspended'
119 match '/index.html' => 'site#index'
120 match '/edit.html' => 'site#edit'
121 match '/export.html' => 'site#export'
122 match '/login.html' => 'user#login'
123 match '/logout.html' => 'user#logout'
124 match '/create-account.html' => 'user#new'
125 match '/forgot-password.html' => 'user#lost_password'
128 match '/go/:code' => 'site#permalink', :code => /[a-zA-Z0-9_@~]+[=-]*/
131 match '/user/:display_name/traces/tag/:tag/page/:page' => 'trace#list'
132 match '/user/:display_name/traces/tag/:tag' => 'trace#list'
133 match '/user/:display_name/traces/page/:page' => 'trace#list'
134 match '/user/:display_name/traces' => 'trace#list'
135 match '/user/:display_name/traces/tag/:tag/rss' => 'trace#georss'
136 match '/user/:display_name/traces/rss' => 'trace#georss'
137 match '/user/:display_name/traces/:id' => 'trace#view'
138 match '/user/:display_name/traces/:id/picture' => 'trace#picture'
139 match '/user/:display_name/traces/:id/icon' => 'trace#icon'
140 match '/traces/tag/:tag/page/:page' => 'trace#list'
141 match '/traces/tag/:tag' => 'trace#list'
142 match '/traces/page/:page' => 'trace#list'
143 match '/traces' => 'trace#list'
144 match '/traces/tag/:tag/rss' => 'trace#georss'
145 match '/traces/rss' => 'trace#georss'
146 match '/traces/mine/tag/:tag/page/:page' => 'trace#mine'
147 match '/traces/mine/tag/:tag' => 'trace#mine'
148 match '/traces/mine/page/:page' => 'trace#mine'
149 match '/traces/mine' => 'trace#mine'
150 match '/trace/create' => 'trace#create'
151 match '/trace/:id/data' => 'trace#data'
152 match '/trace/:id/data.:format' => 'trace#data'
153 match '/trace/:id/edit' => 'trace#edit'
154 match '/trace/:id/delete' => 'trace#delete'
157 match '/diary/new' => 'diary_entry#new'
158 match '/diary/friends' => 'diary_entry#list', :friends => true
159 match '/diary/nearby' => 'diary_entry#list', :nearby => true
160 match '/user/:display_name/diary/rss' => 'diary_entry#rss', :format => :rss
161 match '/diary/:language/rss' => 'diary_entry#rss', :format => :rss
162 match '/diary/rss' => 'diary_entry#rss', :format => :rss
163 match '/user/:display_name/diary/comments/:page' => 'diary_entry#comments', :page => /\d+/
164 match '/user/:display_name/diary/comments/' => 'diary_entry#comments'
165 match '/user/:display_name/diary' => 'diary_entry#list'
166 match '/diary/:language' => 'diary_entry#list'
167 match '/diary' => 'diary_entry#list'
168 match '/user/:display_name/diary/:id' => 'diary_entry#view', :id => /\d+/
169 match '/user/:display_name/diary/:id/newcomment' => 'diary_entry#comment', :id => /\d+/
170 match '/user/:display_name/diary/:id/edit' => 'diary_entry#edit', :id => /\d+/
171 match '/user/:display_name/diary/:id/hide' => 'diary_entry#hide', :id => /\d+/
172 match '/user/:display_name/diary/:id/hidecomment/:comment' => 'diary_entry#hidecomment', :id => /\d+/, :comment => /\d+/
175 match '/user/:display_name' => 'user#view'
176 match '/user/:display_name/make_friend' => 'user#make_friend'
177 match '/user/:display_name/remove_friend' => 'user#remove_friend'
178 match '/user/:display_name/account' => 'user#account'
179 match '/user/:display_name/set_status' => 'user#set_status'
180 match '/user/:display_name/delete' => 'user#delete'
183 match '/users' => 'user#list'
184 match '/users/:status' => 'user#list'
187 match '/test/populate/:table/:from/:count' => 'test#populate'
188 match '/test/populate/:table/:count' => 'test#populate', :from => 1
191 match '/geocoder/search' => 'geocoder#search'
192 match '/geocoder/search_latlon' => 'geocoder#search_latlon'
193 match '/geocoder/search_us_postcode' => 'geocoder#search_us_postcode'
194 match '/geocoder/search_uk_postcode' => 'geocoder#search_uk_postcode'
195 match '/geocoder/search_ca_postcode' => 'geocoder#search_ca_postcode'
196 match '/geocoder/search_osm_namefinder' => 'geocoder#search_osm_namefinder'
197 match '/geocoder/search_osm_nominatim' => 'geocoder#search_osm_nominatim'
198 match '/geocoder/search_geonames' => 'geocoder#search_geonames'
199 match '/geocoder/description' => 'geocoder#description'
200 match '/geocoder/description_osm_namefinder' => 'geocoder#description_osm_namefinder'
201 match '/geocoder/description_osm_nominatim' => 'geocoder#description_osm_nominatim'
202 match '/geocoder/description_geonames' => 'geocoder#description_geonames'
205 match '/export/start' => 'export#start'
206 match '/export/finish' => 'export#finish'
209 match '/user/:display_name/inbox' => 'message#inbox'
210 match '/user/:display_name/outbox' => 'message#outbox'
211 match '/message/new/:display_name' => 'message#new'
212 match '/message/read/:message_id' => 'message#read'
213 match '/message/mark/:message_id' => 'message#mark'
214 match '/message/reply/:message_id' => 'message#reply'
215 match '/message/delete/:message_id' => 'message#delete'
217 # oauth admin pages (i.e: for setting up new clients, etc...)
218 scope "/user/:display_name" do
219 resources :oauth_clients
221 match '/oauth/revoke' => 'oauth#revoke'
222 match '/oauth/authorize' => 'oauth#authorize', :as => :authorize
223 match '/oauth/token' => 'oauth#token', :as => :token
224 match '/oauth/request_token' => 'oauth#request_token', :as => :request_token
225 match '/oauth/access_token' => 'oauth#access_token', :as => :access_token
226 match '/oauth/test_request' => 'oauth#test_request', :as => :test_request
228 # roles and banning pages
229 match '/user/:display_name/role/:role/grant' => 'user_roles#grant'
230 match '/user/:display_name/role/:role/revoke' => 'user_roles#revoke'
231 match '/user/:display_name/blocks' => 'user_blocks#blocks_on'
232 match '/user/:display_name/blocks_by' => 'user_blocks#blocks_by'
233 match '/blocks/new/:display_name' => 'user_blocks#new'
234 resources :user_blocks
235 match '/blocks/:id/revoke' => 'user_blocks#revoke'
238 match ':controller/:id/:action' => '#index'
239 match ':controller/:action' => '#index'