From c8af5673bb9cd45f97ca4b76745fccb2ed1a8d0f Mon Sep 17 00:00:00 2001 From: Francis Irving Date: Sat, 9 Oct 2010 02:01:34 +0100 Subject: First .json API call --- app/views/help/api.rhtml | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) (limited to 'app/views/help/api.rhtml') diff --git a/app/views/help/api.rhtml b/app/views/help/api.rhtml index f984bed4d..9679f3cc7 100644 --- a/app/views/help/api.rhtml +++ b/app/views/help/api.rhtml @@ -14,7 +14,9 @@ interact with WhatDoTheyKnow via an "API". lots of things that are similar in use to an API as they are requested.

-

Linking to new requests

+
+ +

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") %>. @@ -27,18 +29,39 @@ These are the parameters you can add to those URLs, either in the URL or from a

  • tags - space separated list of tags, so you can find and link up any requests made later, e.g. openlylocal spending_id:12345. The : indicates it is a machine tag. The values of machine tags may also include colons, useful for URIs. -

    RSS (actually, Atom) feeds

    +
    + +

    2. RSS (actually, Atom) feeds

    There are Atom feeds throughout the site, which you can use to get updates -and links in XML format. +and links in XML format. Find the URL of the Atom feed in one of these ways: +

    -

    In particular, search queries, however complicated, all have Atom feeds. +

    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, by status. See the advanced search +type, by date range, or by status. See the advanced search tips for details. -

    +
    + +

    3. JSON structured data

    + +

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

      +
    • Adding .json to the end of the URL.
    • +
    • Look for the <link rel="alternate" type="application/json"> tag in the head of the HTML.
    • +
    +

    + +
    +

    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