aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2010-10-04 01:34:25 +0100
committerFrancis Irving <francis@mysociety.org>2010-10-04 01:34:25 +0100
commit9870707e24a4dd5d1c931256d6e85ee042e540fc (patch)
treed72f7bf857a97c48295c8482b848c5a46ba8ddc2
parent759ddc5ad79189dc6ce9b2ae44296b6fa1076e39 (diff)
Add initial API help
-rw-r--r--app/controllers/help_controller.rb3
-rw-r--r--app/views/help/api.rhtml37
-rw-r--r--todo.txt3
3 files changed, 43 insertions, 0 deletions
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb
index f35ae3317..0e4fbe136 100644
--- a/app/controllers/help_controller.rb
+++ b/app/controllers/help_controller.rb
@@ -71,4 +71,7 @@ class HelpController < ApplicationController
end
+ def api
+ end
+
end
diff --git a/app/views/help/api.rhtml b/app/views/help/api.rhtml
new file mode 100644
index 000000000..e0fa25151
--- /dev/null
+++ b/app/views/help/api.rhtml
@@ -0,0 +1,37 @@
+<% @title = "Application Programming Interface - API" %>
+
+<h1><%=@title %></h1>
+
+<h2> Introduction </h2>
+
+<p>WhatDoTheyKnow does not have a full API yet, but we are gradually
+adding lots of things that are similar in use to an API as they are requested.
+</p>
+
+<h2> Linking to new requests </h2>
+
+<p>To encourage your users to make links to a particular public authority, use URLs of the form
+<%= link_to new_request_to_body_url(:url_name => "liverpool_city_council") , new_request_to_body_url(:url_name => "liverpool_city_council") %>.
+These are the parameters you can add to those URLs, either in the URL or from a form.
+
+<ul>
+ <li> <strong>title</strong> - default summary </li>
+ <li> <strong>body</strong> - default text of request </li>
+ <li> <strong>tags</strong> - space separated list of tags, so you can find and link up any requests made later, e.g. <em>openlylocal spending_id:12345</em>. The : indicates it is a machine tag. The values of machine tags may also include colons, useful for URIs.
+</ul>
+
+<h2> RSS (actually, Atom) feeds </h2>
+
+<p>There are Atom feeds throughout the site, which you can use to get updates
+and links in XML format.
+
+<p>In particular, search queries, however complicated, all have Atom feeds.
+You can do all sorts of things with them, such as query by authority, by file
+type, by date range, by status. See the <a href="/search">advanced search
+tips</a> for details.
+
+<dl>
+
+
+
+
diff --git a/todo.txt b/todo.txt
index 36dac756f..fe59bd08b 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,5 +1,8 @@
Something nice to wrap salutation round it
+Link to API help
+- mention history on it
+
Tag search