diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb
index 5c8d1be3..01f27140 100644
--- a/app/controllers/todos_controller.rb
+++ b/app/controllers/todos_controller.rb
@@ -47,7 +47,10 @@ class TodosController < ApplicationController
headers['Content-Type']=Mime::TEXT.to_s
render :content_type => Mime::TEXT
end
- format.xml { render :xml => @todos.to_xml( *todo_xml_params ) }
+ format.xml do
+ @xml_todos = params[:limit_to_active_todos] ? @not_done_todos : @todos
+ render :xml => @xml_todos.to_xml( *todo_xml_params )
+ end
format.any(:rss, :atom) { @feed_title, @feed_description = 'Tracks Actions', "Actions for #{current_user.display_name}" }
format.ics
end
diff --git a/app/views/integrations/rest_api.html.erb b/app/views/integrations/rest_api.html.erb
index f52eb413..277d0eaf 100644
--- a/app/views/integrations/rest_api.html.erb
+++ b/app/views/integrations/rest_api.html.erb
@@ -79,6 +79,15 @@ field to ID, created_at, modified_at, completed_at by adding the pa
+If you only want to get the active todos, you add the parameter limit_to_active_todos and set it to some value like this:
+
+
+
+ $ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
+ <%= root_url %>todos.xml?limit_to_active_todos=1
+
+
+
The API provides mechanisms for adding, updating and deleting resources using the HTTP methods PUT, POST and DELETE in combination with the content.