X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7f92d533d00c83c653322aae60413ccbbd36e10d..02451061ce944a3c32afe976759d19c3b1fa3a5d:/app/controllers/api_controller.rb diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 62633dbb3..7e8017f4e 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -1,5 +1,6 @@ class ApiController < ApplicationController + session :off after_filter :compress_output #COUNT is the number of map requests to allow before exiting and starting a new process @@ -243,6 +244,22 @@ class ApiController < ApplicationController exit! end + end + + def capabilities + doc = OSM::API.new.get_xml_doc + api = XML::Node.new 'api' + version = XML::Node.new 'version' + version['minimum'] = '0.4'; + version['maximum'] = '0.4'; + api << version + area = XML::Node.new 'area' + area['maximum'] = MAX_REQUEST_AREA.to_s; + api << area + + doc.root << api + + render :text => doc.to_s, :content_type => "text/xml" end end