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