OpenStreetMap::Application.routes.draw do
# API
- get "api/capabilities" => "api#capabilities"
+ namespace :api do
+ get "capabilities" => "capabilities#show"
+ end
scope "api/0.6" do
- get "capabilities" => "api#capabilities"
- get "permissions" => "api#permissions"
-
- put "changeset/create" => "changesets#create"
- post "changeset/:id/upload" => "changesets#upload", :id => /\d+/
- get "changeset/:id/download" => "changesets#download", :as => :changeset_download, :id => /\d+/
- post "changeset/:id/expand_bbox" => "changesets#expand_bbox", :id => /\d+/
- get "changeset/:id" => "changesets#show", :as => :changeset_show, :id => /\d+/
- post "changeset/:id/subscribe" => "changesets#subscribe", :as => :changeset_subscribe, :id => /\d+/
- post "changeset/:id/unsubscribe" => "changesets#unsubscribe", :as => :changeset_unsubscribe, :id => /\d+/
- put "changeset/:id" => "changesets#update", :id => /\d+/
- put "changeset/:id/close" => "changesets#close", :id => /\d+/
- get "changesets" => "changesets#query"
- post "changeset/:id/comment" => "changeset_comments#create", :as => :changeset_comment, :id => /\d+/
- post "changeset/comment/:id/hide" => "changeset_comments#destroy", :as => :changeset_comment_hide, :id => /\d+/
- post "changeset/comment/:id/unhide" => "changeset_comments#restore", :as => :changeset_comment_unhide, :id => /\d+/
+ get "capabilities" => "api/capabilities#show"
+ get "permissions" => "api/permissions#show"
+
+ put "changeset/create" => "api/changesets#create"
+ post "changeset/:id/upload" => "api/changesets#upload", :id => /\d+/
+ get "changeset/:id/download" => "api/changesets#download", :as => :changeset_download, :id => /\d+/
+ post "changeset/:id/expand_bbox" => "api/changesets#expand_bbox", :id => /\d+/
+ get "changeset/:id" => "api/changesets#show", :as => :changeset_show, :id => /\d+/
+ post "changeset/:id/subscribe" => "api/changesets#subscribe", :as => :changeset_subscribe, :id => /\d+/
+ post "changeset/:id/unsubscribe" => "api/changesets#unsubscribe", :as => :changeset_unsubscribe, :id => /\d+/
+ put "changeset/:id" => "api/changesets#update", :id => /\d+/
+ put "changeset/:id/close" => "api/changesets#close", :id => /\d+/
+ get "changesets" => "api/changesets#query"
+ post "changeset/:id/comment" => "api/changeset_comments#create", :as => :changeset_comment, :id => /\d+/
+ post "changeset/comment/:id/hide" => "api/changeset_comments#destroy", :as => :changeset_comment_hide, :id => /\d+/
+ post "changeset/comment/:id/unhide" => "api/changeset_comments#restore", :as => :changeset_comment_unhide, :id => /\d+/
put "node/create" => "nodes#create"
get "node/:id/ways" => "ways#ways_for_node", :id => /\d+/
delete "relation/:id" => "relations#delete", :id => /\d+/
get "relations" => "relations#index"
- get "map" => "api#map"
+ get "map" => "api/map#index"
- get "trackpoints" => "api#trackpoints"
+ get "trackpoints" => "api/tracepoints#index"
- get "changes" => "api#changes"
+ get "changes" => "api/changes#index"
- get "search" => "search#search_all", :as => "api_search"
- get "ways/search" => "search#search_ways"
- get "relations/search" => "search#search_relations"
- get "nodes/search" => "search#search_nodes"
+ get "search" => "api/search#search_all", :as => "api_search"
+ get "ways/search" => "api/search#search_ways"
+ get "relations/search" => "api/search#search_relations"
+ get "nodes/search" => "api/search#search_nodes"
get "user/:id" => "users#api_read", :id => /\d+/
get "user/details" => "users#api_details"