문제

I am playing around with Google Books API. I use the following jQuery code to get a book result searching by the book's ISBN:

$.ajax({
    dataType: "jsonp",
    url: 'https://www.googleapis.com/books/v1/volumes',
    data: {q: 'isbn:' + myIsbn, country: 'UK'},
    crossDomain: true,
    success: function(data){
        console.info('Google Books API retrieved:');
        console.info(data);
    },
    error: function(){
        console.log(arguments)
    }
});

The problem I face is that whatever book I search for, salesInfo.salablity is always "NOT_FOR_SALE"

"saleInfo" : { "country" : "GB",
               "isEbook" : false,
               "saleability" : "NOT_FOR_SALE"
             }

Any ideas why? Thanks in advance.

도움이 되었습니까?

해결책

From Google Developer's website

Saleability Means:

Whether or not this book is available for sale or offered for free in the Google eBookstore for the country listed above. Possible values are FOR_SALE, FREE, NOT_FOR_SALE, or FOR_PREORDER. The value returned may be null

possibly, the book you are searching for might not be available( on Google eBookstore) for sale in the country you are searching for.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top