various map API rails stuff

This commit is contained in:
Steve Coast 2006-11-27 15:06:34 +00:00
parent 6b73747271
commit 2803612d9d
8 changed files with 53 additions and 25 deletions

View file

@ -52,6 +52,7 @@ end
# Include your application configuration below
API_VERSION = '0.4'
ActionMailer::Base.server_settings = {
:address => "localhost",

View file

@ -1,20 +1,20 @@
ActionController::Routing::Routes.draw do |map|
# API
API_VERSION = '0.4' # change this in envronment.rb too
map.connect "api/#{API_VERSION}/node/create", :controller => 'node', :action => 'create'
map.connect "api/#{API_VERSION}/node/:id/history", :controller => 'node', :action => 'history', :id => nil
map.connect "api/#{API_VERSION}/node/:id", :controller => 'node', :action => 'rest', :id => nil
map.connect 'api/0.4/node/create', :controller => 'node', :action => 'create'
map.connect 'api/0.4/node/:id/history', :controller => 'node', :action => 'history', :id => nil
map.connect 'api/0.4/node/:id', :controller => 'node', :action => 'rest', :id => nil
map.connect "api/#{API_VERSION}/segment/create", :controller => 'segment', :action => 'create'
map.connect "api/#{API_VERSION}/segment/:id/history", :controller => 'segment', :action => 'history'
map.connect "api/#{API_VERSION}/segment/:id", :controller => 'segment', :action => 'rest'
map.connect 'api/0.4/segment/create', :controller => 'segment', :action => 'create'
map.connect 'api/0.4/segment/:id/history', :controller => 'segment', :action => 'history'
map.connect 'api/0.4/segment/:id', :controller => 'segment', :action => 'rest'
map.connect "api/#{API_VERSION}/way/create", :controller => 'way', :action => 'create'
map.connect "api/#{API_VERSION}/way/:id/history", :controller => 'way', :action => 'history'
map.connect "api/#{API_VERSION}/way/:id", :controller => 'way', :action => 'rest'
map.connect 'api/0.4/way/create', :controller => 'way', :action => 'create'
map.connect 'api/0.4/way/:id/history', :controller => 'way', :action => 'history'
map.connect 'api/0.4/way/:id', :controller => 'way', :action => 'rest'
map.connect 'api/0.4/map', :controller => 'api', :action => 'map'
map.connect "api/#{API_VERSION}/map", :controller => 'api', :action => 'map'
# web site