Cori wrote:Perhaps we need to consider turning off the dev server API?
In my opinion, at least the URLs at https://dev.librivox.org/public/temp_info/api
should be changed to point to the official server, because 3 out of the top 4 results on Google for "librivox api" lead to that page(the first post of this thread is one of these results BTW).
ekzemplaro wrote:Hello vpanayotov san,
Welcome to LibriVox. I hope you enjoy it here.
Thank you! I am sure I will enjoy it, because LibriVox has a really great community.
When librvivox becomes open source, let's develop this API.
Interesting - do you know when it will be open sourced?
By the way how are we supposed to iterate over the project records using the API?
I guess one should use the 'offset' and 'limit' parameters and increase the offset in each consequent request? I noticed that this doesn't work exactly as I would expect, though.
For example https://librivox.org/api/feed/audiobooks/?offset=15&limit=5&extended=1
returns 4(although we are requesting 5) records, with the first being for project with id '78' and the last for project '83'. Moreover if we increase the 'offset' by 4 (https://librivox.org/api/feed/audiobooks/?offset=19&limit=5&extended=1
), for the next request we get again the info for project 83 in the first position.
If we remove the 'extended=1' option the request https://librivox.org/api/feed/audiobooks/?offset=15&limit=5
returns 5 records, and the first record is for project '76', which is for some reason omitted in the 'extended' version. I wonder when should I stop iterating, i.e. are we guaranteed that at some point the API will not return (a 'false') empty response (0 records) even though there are more projects?
It seems that the API will require some more work, and I was wondering if the raw data that the API is using is available for download somewhere (e.g. in the form of a database dump)?