It looks like you're offline.
Open Library logo

Upcoming Lists API → Diff

Added
Modified
Removed
Not changed
Revision 6 by Anand Chitipothu December 21, 2010
Revision 17 by raybb October 15, 2023
title Upcoming Lists API Lists API
m edit
body
0 This is a draft of upcoming lists API. This is still under development. 0 * [Create a list](#create-list)
1 1 * [Add/delete a seed from a list](#edits-seed)
2 ## Get Lists of a user 2 * [Delete a list](#delete-list)
3 * [Update a list](#update-list) -- not implemented
4 * [Get a user's lists](#users-lists)
5 * [Get lists containing a seed](#seed-lists)
6 * [Get seeds of a list](#read-list)
7 * [Get editions of a list](#get-editions) (for works use the seeds API above)
8 * [Get subjects of a list](#get-subjects)
9 * [Search lists](#search-lists)
10
11 <a name="users-lists">&nbsp;</a>
12 ## Get a user's lists
3 3
... ...
32            }, 32            },
33            { 43            ...
34                ... 44        ]
35            }, 45    }
36            { 46
37                ... 47 <a name="seed-lists">&nbsp;</a>
38            }, 48 ## Get lists containing a seed
39            {
40                ...
41            }
42        ]
43    }
44    
45 ## Get lists of a seed
46 46
... ...
77 77
78 ## List 81 <a name="search-lists">&nbsp;</a>
79 82 ## Search lists
80 **Create a list:** 83
84 - limited to 100 results for performance reasons
85
86 Request:
87
88    GET http://openlibrary.org/search/lists.json?q=book&limit=20&offset=0
89
90 Response:
91
92    {
93        "start": 0,
94        "docs": [
95            {
96            "seed_count": 1,
97            "edition_count": 0,
98            "url": "/people/rosey1234/lists/OL68457L",
99            "last_update": "2019-10-12T17:05:09.130806",
100            "full_url": "/people/rosey1234/lists/OL68457L/book",
101            "name": "book"
102            },
103            {
104            "seed_count": 1,
105            "edition_count": 0,
106            "url": "/people/alebuitrago/lists/OL69449L",
107            "last_update": "2019-10-12T17:05:09.130806",
108            "full_url": "/people/alebuitrago/lists/OL69449L/book",
109            "name": "book"
110            },
111            ...
112        ]
113    }
114
115
116 <a name="create-list">&nbsp;</a>
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)
81 81
... ...
100    Location: http://openlibrary.org/user/anand/lists/OL1L 100    Location: http://openlibrary.org/user/anand/lists/OL1L
101     157
102 **Read a list:** 158 <a name="read-list">&nbsp;</a>
159 ##Read a list
103 103
... ...
127 127
128 **Update a list:** 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>
194 ## Update a list
129 129
... ...
151    {"key": "/people/anand/list/OL1L", "revision": 3} 151    {"key": "/people/anand/list/OL1L", "revision": 3}
152     218
153     219 <a name="read-list">&nbsp;</a>
154 **Get seeds of a list** 220 ## Get seeds of a list
155 155
... ...
194            }, 194            },
195            { 261            ...
196                ...
197            },
198            {
199                ...
200            },
201            {
202                ...
203            }
204        ] 262        ]
205    }     263    }    
206 264
207 **Add/delete a seed from a list:** 265 <a name="edits-seeds">&nbsp;</a>
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
208 208
... ...
228    {"ok": "true"} 228    {"ok": "true"}
229     311
230 **Get editions of a list**: 312 <a name="get-editions">&nbsp;</a>
313 ## Get editions of a list
231 231
... ...
310 310
311 **Get subjects of a list:** 394 <a name="get-subjects">&nbsp;</a>
395 ## Get subjects of a list
312 312
... ...
355    } 355    }
440
441 <a name="edits-seed">&nbsp;</a>
permission /permission/dev-docs