6 The Directory API can be used to discover podcasts.
8 TODO: report problems with podcasts (eg duplicates, missing data)
14 The Directory API defines the following resources ::
18 /directory/tags/latest
20 /user/{username}/suggestions
26 The podcast toplist ranks podcasts by their number of subscribers.
32 * **lang**: a ISO 639-1 (two-letter) language code. If given, only podcasts in
33 this language are returned. If omitted, no language restriction is made.
40 GET /directory/toplist{?lang:2}
41 Content-Tpe: application/json
47 The response contains a ``toplist`` member which has a list of
48 :ref:`podcast-type` objects. The first entry in the list represents the highest
49 ranking podcast in the toplist. If a ``lang`` parameter was included in the
50 request, it is also included in the response. ::
53 Content-Tpe: application/json
72 * **q**: query string (mandatory)
78 The search query is provided as a GET parameter. ::
80 GET /search/podcasts{?q}
81 Content-Tpe: application/json
87 If the search could be performed, the search results (if any) are returned in
88 the ``search`` member. The query is returned in the ``query`` member. ::
91 Content-Type: application/json
103 If the search could not be performed, for example because the query was
107 Content-Type: application/json
110 "message": "parameter q missing",
114 code: "parameter_missing"
125 GET /search/podcasts?q=linux
126 Content-Tpe: application/json
130 Content-Tpe: application/json
134 { "url": "http://example.com/feed.rss", ...},
146 The "Latest Tags" endpoint returns *current* tags. Those are tags for which
147 podcasts have recently published a new episode.
152 * **num**: number of tags to return (optional, default: 10)
158 The number of tags to return can be included in the request. ::
160 GET /directory/tags/latest{?num}
161 Content-Tpe: application/json
167 In the ``tags`` member a list of :ref:`tag-type` objects is provided. ::
170 Content-Tpe: application/json
171 Link: <https://api.gpodder.net/3/directory/tag/{label}>; rel="https://api.gpodder.net/3/relation/tag-podcasts"; title="Podcasts for tag {label}"
175 { "label": "Technology" },
181 Clients can use the provided ``Link`` header and resolve the `URI template
182 <http://tools.ietf.org/html/rfc6570>`_ to obtain the URL for retrieving the
183 podcasts of a certain tag.
189 Clients can retrieve podcasts for a given tag.
197 GET /directory/tag/{tag}
198 Content-Tpe: application/json
207 Content-Tpe: application/json
215 Clients can retrieve suggested podcasts for the current user.
223 GET /user/{username}/suggestions
224 Content-Tpe: application/json
231 The response contains a ``suggestions`` member which has a list of
232 :ref:`podcast-type` objects. ::
235 Content-Tpe: application/json