From b67d819d3cedc999bd03e6b07eaf0a084745b3e1 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Tue, 9 Apr 2013 17:10:32 +0100 Subject: Rename the .rhtml files to .html.erb for Rails 3 --- lib/views/help/api.html.erb | 83 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 lib/views/help/api.html.erb (limited to 'lib/views/help/api.html.erb') diff --git a/lib/views/help/api.html.erb b/lib/views/help/api.html.erb new file mode 100644 index 0000000..323bdb7 --- /dev/null +++ b/lib/views/help/api.html.erb @@ -0,0 +1,83 @@ +<% @title = "Application Programming Interface - API" %> + +<%= render :partial => 'sidebar' %> + +
+

<%=@title %>

+ +

Introduction

+ +

This page explains how programmers can make other websites and software +interact with <%= site_name %> via an "API". +

+ +

<%= site_name %> 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. +

+ +
+ +

1. Linking to new requests

+ +

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. + +

+ +
+ +

2. RSS (actually, Atom) feeds

+ +

There are Atom feeds on most pages which list FOI requests, which you can +use to get updates and links in XML format. Find the URL of the Atom feed in +one of these ways: +

+ +

In particular, even complicated search queries have Atom feeds. +You can do all sorts of things with them, such as query by authority, by file +type, by date range, or by status. See the advanced search +tips for details. + +


+ +

3. JSON structured data

+ +

Quite a few pages have JSON versions, which let you download information about +objects in a structured form. Find them by: +

+

+ +

Requests, users and authorities all have JSON versions containing basic +information about them. Every Atom feed has a JSON equivalent, containing +information about the list of events in the feed. +

+ +
+

4. Spreadsheet of all authorities

+ +

+A spreadsheet file listing every body in <%= site_name %> is available: +<%= link_to "all-authorities.csv", all_public_bodies_csv_url() %> +

+ +
+ +

Please contact us if you need an API feature that isn't there yet. It's +very much a work in progress, and we do add things when people ask us to.

+ + + +
-- cgit v1.2.3