]> git.openstreetmap.org Git - rails.git/blobdiff - config/routes.rb
Merge branch 'master' into openstreetbugs
[rails.git] / config / routes.rb
index 471f67e732f5b8911914068f5f26eb356448fb27..62c263f0d45c4fd1dd97e8c8ec0c8fdd003b9dde 100644 (file)
@@ -70,11 +70,28 @@ OpenStreetMap::Application.routes.draw do
   match 'api/0.6/gpx/:id/data.:format' => 'trace#api_data'
   
   # AMF (ActionScript) API
-
   match 'api/0.6/amf/read' => 'amf#amf_read'
   match 'api/0.6/amf/write' => 'amf#amf_write'
   match 'api/0.6/swf/trackpoints' => 'swf#trackpoints'
 
+  # Map notes API
+  match 'api/0.6/notes' => 'note#list'
+  match 'api/0.6/notes.:format' => 'note#list'
+  match 'api/0.6/notes/search' => 'note#search'
+  match 'api/0.6/notes/rss'  => 'notes#rss'
+  match 'api/0.6/note/create' => 'note#create'
+  match 'api/0.6/note/:id/comment' => 'note#update', :id => /\d+/
+  match 'api/0.6/note/:id/close' => 'note#close', :id => /\d+/
+  match 'api/0.6/note/:id' => 'note#read', :via => :get, :id => /\d+/
+  match 'api/0.6/note/:id.:format' => 'note#read', :via => :get, :id => /\d+/
+  match 'api/0.6/note/:id' => 'note#delete', :via => :delete, :id => /\d+/
+  match 'api/0.6/notes/getBugs' => 'note#list'
+  match 'api/0.6/notes/addPOIexec' => 'note#create'
+  match 'api/0.6/notes/closePOIexec' => 'note#close'
+  match 'api/0.6/notes/editPOIexec' => 'note#update'
+  match 'api/0.6/notes/getGPX' => 'note#list', :format => :gpx
+  match 'api/0.6/notes/getRSSfeed' => 'note#rss'
+
   # Data browsing
   match '/browse/start' => 'browse#start'
   match '/browse/way/:id' => 'browse#way', :id => /\d+/
@@ -85,9 +102,12 @@ OpenStreetMap::Application.routes.draw do
   match '/browse/relation/:id/history' => 'browse#relation_history', :id => /\d+/
   match '/browse/changeset/:id' => 'browse#changeset', :as => :changeset, :id => /\d+/
   match '/user/:display_name/edits' => 'changeset#list'
-  match '/user/:display_name/edits/feed' => 'changeset#list', :format => :atom
+  match '/user/:display_name/edits/feed' => 'changeset#feed', :format => :atom
+  match '/browse/friends' => 'changeset#list', :friends => true
   match '/browse/changesets' => 'changeset#list'
-  match '/browse/changesets/feed' => 'changeset#list', :format => :atom
+  match '/browse/changesets/feed' => 'changeset#feed', :format => :atom
+  match '/browse/note/:id' => 'browse#note', :id => /\d+/
+  match '/user/:display_name/notes' => 'note#mine'
   match '/browse' => 'changeset#list'
 
   # web site
@@ -96,7 +116,7 @@ OpenStreetMap::Application.routes.draw do
   match '/copyright' => 'site#copyright'
   match '/copyright/:copyright_locale' => 'site#copyright'
   match '/history' => 'changeset#list'
-  match '/history/feed' => 'changeset#list', :format => :atom
+  match '/history/feed' => 'changeset#feed', :format => :atom
   match '/export' => 'site#export'
   match '/login' => 'user#login'
   match '/logout' => 'user#logout'
@@ -123,7 +143,7 @@ OpenStreetMap::Application.routes.draw do
   match '/forgot-password.html' => 'user#lost_password'
 
   # permalink
-  match '/go/:code' => 'site#permalink', :code => /[a-zA-Z0-9_@]+[=-]*/
+  match '/go/:code' => 'site#permalink', :code => /[a-zA-Z0-9_@~]+[=-]*/
 
   # traces
   match '/user/:display_name/traces/tag/:tag/page/:page' => 'trace#list'
@@ -213,7 +233,8 @@ OpenStreetMap::Application.routes.draw do
     resources :oauth_clients
   end
   match '/oauth/revoke' => 'oauth#revoke'
-  match '/oauth/authorize' => 'oauth#oauthorize', :as => :authorize
+  match '/oauth/authorize' => 'oauth#authorize', :as => :authorize
+  match '/oauth/token' => 'oauth#token', :as => :token
   match '/oauth/request_token' => 'oauth#request_token', :as => :request_token
   match '/oauth/access_token' => 'oauth#access_token', :as => :access_token
   match '/oauth/test_request' => 'oauth#test_request', :as => :test_request