Open CrowMash opened 1 year ago
Hello,
After looking into this issue it seems like a glitch/defect with the Google Books API.
The /api/book/new
endpoint queries the Google Books API with this URL: https://www.googleapis.com/books/v1/volumes?q=Max+Brooks+Attaques
. As you pointed out, the third response lacks a publisher and author. Interestingly, if you search for the third response's Google Books ID ("aIMZjwEACAAJ") directly through the API, more info is included:
https://www.googleapis.com/books/v1/volumes/aIMZjwEACAAJ
Response:
{
"kind": "books#volume",
"id": "aIMZjwEACAAJ",
"etag": "7txxEWZ0DCs",
"selfLink": "https://www.googleapis.com/books/v1/volumes/aIMZjwEACAAJ",
"volumeInfo": {
"title": "Attaques répertoriées",
"authors": [
"Max Brooks"
],
"publisher": "LGF/Le Livre de Poche",
"publishedDate": "2015",
"description": "<long description...>",
"industryIdentifiers": [
{
"type": "ISBN_10",
"identifier": "225318392X"
},
{
"type": "ISBN_13",
"identifier": "9782253183921"
}
],
"readingModes": {
"text": false,
"image": false
},
"pageCount": 144,
"printedPageCount": 144,
"dimensions": {
"height": "21.00 cm",
"width": "14.70 cm",
"thickness": "1.20 cm"
},
"printType": "BOOK",
"maturityRating": "NOT_MATURE",
"allowAnonLogging": false,
"contentVersion": "preview-1.0.0",
"language": "fr",
"previewLink": "http://books.google.com/books?id=aIMZjwEACAAJ&hl=&source=gbs_api",
"infoLink": "https://play.google.com/store/books/details?id=aIMZjwEACAAJ&source=gbs_api",
"canonicalVolumeLink": "https://play.google.com/store/books/details?id=aIMZjwEACAAJ"
},
...
As you can see, author and publisher are included (though category & image link are still missing).
In Booktracker, the 1st Google Books API endpoint is used for searching for books, and the 2nd one is used for saving them. This means that although author and publisher won't show up when searching for this book, they will still get added automatically when you save the book to your list. As for the missing category and images, I think some Google Books records just don't have those at all.
Thanks for pointing this out. I'm not sure if fixing it is feasible since it seems to be a rare issue with the Google Books API that is mostly resolved after saving the book, but I'm happy to discuss it more if you'd like.
In Booktracker, the 1st Google Books API endpoint is used for searching for books, and the 2nd one is used for saving them. This means that although author and publisher won't show up when searching for this book, they will still get added automatically when you save the book to your list. As for the missing category and images, I think some Google Books records just don't have those at all.
You were right, after saving the book, all the informations avaible on Google Books were there.
Thanks for pointing this out. I'm not sure if fixing it is feasible since it seems to be a rare issue with the Google Books API that is mostly resolved after saving the book, but I'm happy to discuss it more if you'd like.
Maybe you could use the first API call to get IDs and the second one to get data for every IDs you got.
A feature request that could be very useful too: add a pagination on search, because showing only 12 results can be not enough sometime.
Again, thanks for this project!
Hi! Thanks a lot for this project!
Just found something weird, when I search "Max Brooks Attaques", some infos are missing. In the response from /api/books/new I get that :
But when I search on Google Books : here, infos are not missing :