Improve Events API draft
[mygpo.git] / doc / api / reference / formats.rst
blob22a7487e6d483f60733f19a71047d8a994204dd0
1 Formats
2 =======
4 Some resources are offered in several different formats
6 * OPML
7 * JSON
8 * JSONP with an option function name that wraps the result (since 2.8)
9 * plain text with one URL per line
10 * XML a custom XML format (see example, since 2.9)
12 JSON
13 ----
15 JSON::
17  [
18   {
19    "website": "http://sixgun.org",
20    "description": "The hardest-hitting Linux podcast around",
21    "title": "Linux Outlaws",
22    "url": "http://feeds.feedburner.com/linuxoutlaws",
23    "position_last_week": 1,
24    "subscribers_last_week": 1943,
25    "subscribers": 1954,
26    "mygpo_link": "http://gpodder.net/podcast/11092",
27    "logo_url": "http://sixgun.org/files/linuxoutlaws.jpg",
28    "scaled_logo_url": "http://gpodder.net/logo/64/fa9fd87a4f9e488096e52839450afe0b120684b4.jpg"
29   },
30   # more podcasts here
31  ]
33 XML
34 ---
36 .. code-block:: xml
38  <podcasts>
39   <podcast>
40    <title>Linux Outlaws</title>
41    <url>http://feeds.feedburner.com/linuxoutlaws</url>
42    <website>http://sixgun.org</website>
43    <mygpo_link>http://gpodder.net/podcast/11092</mygpo_link>
44    <description>The hardest-hitting Linux podcast around</description>
45    <subscribers>1954</subscribers>
46    <subscribers_last_week>1943</subscribers_last_week>
47    <logo_url>http://sixgun.org/files/linuxoutlaws.jpg</logo_url>
48    <scaled_logo_url>http://gpodder.net/logo/64/fa9fd87a4f9e488096e52839450afe0b120684b4.jpg</scaled_logo_url>
49   </podcast>
50  </podcasts>