It looks like you're offline.
Open Library logo

Upcoming Lists API → Diff

Added
Modified
Removed
Not changed
Revision 7 by Drini October 12, 2019
Revision 17 by raybb October 15, 2023
title Upcoming Lists API Lists API
permission /permission/dev-docs
body
0 This is a draft of upcoming lists API. **This is still under development, and could change at any time.** 0 * [Create a list](#create-list)
1 1 * [Add/delete a seed from a list](#edits-seed)
2 * [Get Lists of a user](#users-lists) 2 * [Delete a list](#delete-list)
3 * [Get lists of a seed](#seed-lists) 3 * [Update a list](#update-list) -- not implemented
4 * [Create a List](#create-list) 4 * [Get a user's lists](#users-lists)
5 * [Update a list](#update-list) 5 * [Get lists containing a seed](#seed-lists)
6 * [Get seeds of a list](#read-list) 6 * [Get seeds of a list](#read-list)
7 * [Add/delete a seed from a list](#edits-seed) 7 * [Get editions of a list](#get-editions) (for works use the seeds API above)
8 * [Get editions of a list](#get-editions) 8 * [Get subjects of a list](#get-subjects)
9 * [Get subjects of a list](#get-subjects) 9 * [Search lists](#search-lists)
10 10
11 11 <a name="users-lists">&nbsp;</a>
12 <a name="users-lists"></a> 12 ## Get a user's lists
13 ## Get Lists of a user
14 14
... ...
47 47
48 <a name="seed-lists"></a> 47 <a name="seed-lists">&nbsp;</a>
49 ## Get lists of a seed 48 ## Get lists containing a seed
50 50
... ...
81 81
82 <a name="search-lists"></a> 81 <a name="search-lists">&nbsp;</a>
83 ## Search Lists 82 ## Search lists
84 84
... ...
116 116
117 <a name="create-list"></a> 116 <a name="create-list">&nbsp;</a>
118 ## Create a List 117 ## Create a list
118
119 - create an empty list (no book seed)
120
121 Request:
122
123    POST /people/anand/lists HTTP/1.1
124    Content-Type: application/json
125    
126    {
127        "name": "Empty List",
128        "description": "This is an empty list with no books added yet.",
129    }
130
131 Response:
132
133    HTTP/1.1 201 Created
134    Location: http://openlibrary.org/user/anand/lists/OL1L
135
136 - create a list with book seed(s)
119 119
... ...
139 139
140 <a name="read-list"></a> 158 <a name="read-list">&nbsp;</a>
141 ##Read a list 141 ##Read a list
... ...
166 166
167 <a name="update-list"></a> 185 <a name="delete-list">&nbsp;</a>
186 ## Delete a list
187
188 Request:
189
190    POST /people/anand/list/OL1L/delete.json
191    Content-Type: application/json
192
193 <a name="update-list">&nbsp;</a>
168 ## Update a list 168 ## Update a list
... ...
191    {"key": "/people/anand/list/OL1L", "revision": 3} 191    {"key": "/people/anand/list/OL1L", "revision": 3}
192     218
193     219 <a name="read-list">&nbsp;</a>
194 ## Get seeds of a list 194 ## Get seeds of a list
... ...
238 238
239 <a name="edits-seeds></a> 265 <a name="edits-seeds">&nbsp;</a>
240 ## Add/delete a seed from a list 266 ## Add/delete a seed from a list
267
268 - Add seed(s) to a list
269
270 Request:
271
272    POST /people/anand/list/OL1L/seeds HTTP/1.1
273    Content-Type: application/json
274    
275    {
276        "add": [
277            {key: "/books/OL25083437M"},
278            {key: "/books/OL24375501M"}
279        ]
280    }
281
282 Response:
283
284    HTTP/1.1 200 OK
285    Content-Type: application/json
286    
287    {"key": "/people/anand/list/OL1L", "revision": 3}
288
289 - Delete seed(s) from a list
241 241
... ...
262 262
263 <a name="get-editions"></a> 312 <a name="get-editions">&nbsp;</a>
264 ## Get editions of a list 264 ## Get editions of a list
... ...
344 344
345 <a name="get-subjects"></a> 394 <a name="get-subjects">&nbsp;</a>
346 ## Get subjects of a list 346 ## Get subjects of a list
... ...
390    } 390    }
440
441 <a name="edits-seed">&nbsp;</a>