Comments (16)
@danmichaelo what was the exact query you put in? I actually noticed a discrepancy if there was a space between isbn: and the number. No space returned 1 result and a space returned like 1600 results
The query can be found in the link I added ;) No key is needed. But the strange part is that I get a different (and seemingly correct) result now! Could it just have been a temporary problem at Google?
For 9788845426544 and 9788811689188 I get zero results both with and without the isbn:
prefix, so that is not the same issue.
from php-google-books.
I believe when you loop through this, you'll need to check if it is not null before displaying it since you obviously can't echo null
from php-google-books.
The point is, if i remove 'isbn:' works fine, i can find the books. But if i restore that string, null is the result.
from php-google-books.
Can you post your code?
from php-google-books.
Sure, i simply make a call to findByGoogleBooks:
/**
* @param GoogleBooks $googlebooks
*/
public function __construct(GoogleBooks $googlebooks)
{
$this->googlebooks = $googlebooks;
}
/**
* Attempt to find a book by isbn from google books
*
* @param String $isbn
* @return Response
*/
public function findByGoogleBooks($isbn)
{
return $this->googlebooks->volumes->byIsbn($isbn);
}
Maybe i need to call search instead of byisbn
from php-google-books.
that method only takes the ISBN. https://github.com/scriptotek/php-google-books/blob/master/src/Volumes.php#L41
I believe what you are saying is you are doing something like:
...->findByGoogleBooks('isbn: 8ynsf...')
it should just be the isbn
...->findByGoogleBooks('8ynsf...')
since we prepend that isbn string. check the link to the Volumes
class
from php-google-books.
@josephmancuso i know, but with prefix 'isbn:' i have always null or empty data, returned from api. But in reality the books exists if i test the call with postman.
from php-google-books.
ahhh ok I see. So removing the 'isbn:' from the volumes class fixes the issue you're saying?
from php-google-books.
@josephmancuso yep, maybe something is changed on google books api. But I could not understand why it did not work anymore, and to test it, i've tried to remove 'isbn:'.
from php-google-books.
hm it looks like the 'isbn:' still works via the google books api.
GET https://www.googleapis.com/books/v1/volumes?q=isbn%3A9780735619678&key={YOUR_API_KEY}
I'll test the actual code some time today. There are two PRs open that significantly change the API for this repo but a hot fix can work for the master branch. @danmichaelo is the owner
if you want to open a PR for the master branch go ahead. I'll test today.
from php-google-books.
With italian isbn doesn't works yet, like 9788807902246
from php-google-books.
Well ISBN are international. That's what the I stands for. They're either 13 digits or 10 digits. I'll test both
from php-google-books.
Of course, then maybe it's google books that has not added all the titles in the world in its archive? :D
from php-google-books.
Hm, this is quite interesting. If you look at the response for 9788807902246, it seems to refer to another book. Here's an excerpt:
{
"title": "Paddy Clarke ha ha ha",
"authors": [
"Roddy Doyle"
],
"publishedDate": "1996",
"industryIdentifiers": [
{
"type": "ISBN_10",
"identifier": "8202160278"
},
{
"type": "ISBN_13",
"identifier": "9788202160272"
}
],
At first I though it was the same book with another ISBN, but when I googled the same ISBN, I found the book Sull'Apocalisse. Testo latino a fronte by di Gioacchino da Fiore (2018) – a very different book.
So it seems like the Google Books API can return information about the wrong item if you just do a free query without the isbn:
prefix. Do you have any other ISBN numbers we can test with?
from php-google-books.
@danmichaelo what was the exact query you put in? I actually noticed a discrepancy if there was a space between isbn: and the number. No space returned 1 result and a space returned like 1600 results
from php-google-books.
@danmichaelo Sure, give me a few minutes to make a list of problematic isbn.
here we go:
9788845426544
9788811689188
from php-google-books.
Related Issues (4)
- Set request origin HOT 1
- Project Status HOT 4
- New Version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-google-books.