5e56c90dca9134f6066ce6d5ae9e530af27651da
[mygpo.git] / doc / api / reference / podcastlists.rst
blob5e56c90dca9134f6066ce6d5ae9e530af27651da
1 Podcast Lists API
2 =================
4 **TODO: this has just been copied from API 2 -- this needs review**
6 **Podcast Lists** are used to collect podcasts about some topics. On the
7 website, podcast lists are available at https://gpodder.net/lists/
9 Resources
10 ---------
12 The Podcast Lists API defines the following resources ::
14     /user/<username>/lists/create
15     /user/<username>/lists
16     /user/<username>/list/<list-name>
19 Creating a Podcast List
20 -----------------------
22 Create a Podcast List ::
24     POST /user/<username>/lists/create?title=<url-encoded title>
25     The list content is sent in the request body
27     requires authenticaton
29 The server then generates a short name for the list from the title given in the
30 Request. For example, from the title "My Python Podcasts" the name
31 "my-python-podcasts" would be generated.
33 Possible Responses
35 * 409 Conflict: if the the user already has a podcast list with the (generated) name
36 * 303 See Other: the podcast list has been created at the URL given in the Location header
39 List the Podcast Lists of a User
40 --------------------------------
41 List User's Lists ::
43     GET /user/<username>/lists
46 Possible Responses
48 * 200 OK, the list of lists in the format given below
50 Response ::
52     [
53         {"title": "My Python Podcasts", "name": "my-python-podcasts", "web": "http://gpodder.net/user/<username>/lists/my-python-podcasts" }
54     ]
57 Retrieve Podcast List
58 ---------------------
60 Retrieve a Podcast List ::
62     GET /user/<username>/list/<list-name>
65 Possible Responses
67 * 404 Not Found if there is no list with the given name
68 * 200 OK and the podcast list in the given format
71 Update
72 ------
74 Update a Podcast List::
76     PUT /user/<username>/list/<list-name>
78 requires authentication
81 Possible Responses
83 * 404 Not Found if there is no list with the given name
84 * 204 No Content If the podcast list has been created / updated
87 Delete a Podcast List
88 ---------------------
90 Delete a Podcast List ::
92     DELETE /user/<username>/list/<list-name>
94 requires authentication
96 Possible Responses
98 * 404 Not Found if there is no podcast list with the given name
99 * 204 No Content if the list has been deleted.