diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/help/api.rhtml | 9 | ||||
-rw-r--r-- | app/views/layouts/default.rhtml | 5 |
2 files changed, 11 insertions, 3 deletions
diff --git a/app/views/help/api.rhtml b/app/views/help/api.rhtml index 46c12b9ec..6f27cf908 100644 --- a/app/views/help/api.rhtml +++ b/app/views/help/api.rhtml @@ -51,14 +51,19 @@ tips</a> for details. <h2> 3. JSON structured data </h2> -<p>Request, public authority and user pages have JSON feeds, which let you download -information about objects in a structured form. Find them by: +<p>Quite a few pages have JSON versions, which let you download information about +objects in a structured form. Find them by: <ul> <li>Adding <tt>.json</tt> to the end of the URL. </li> <li>Look for the <tt><link rel="alternate" type="application/json"></tt> tag in the head of the HTML. </li> </ul> </p> +<p>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. +</p> + <hr> <h2> 4. Spreadsheet of all authorities </h2> diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index 7d91ae4e6..84bc7afde 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -28,10 +28,13 @@ <% if @feed_autodetect %> <% for feed in @feed_autodetect %> <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>"> + <% if feed[:has_json] %> + <link rel="alternate" type="application/json" title="JSON version of <%=h feed[:title] %>" href="<%=h feed[:url]%>.json"> + <% end %> <% end %> <% end %> <% if @has_json %> - <link rel="alternate" type="application/json" title="JSON version" href="<%=h main_url(request.request_uri) %>.json"> + <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri) %>.json"> <% end %> <% if @no_crawl %> |