Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author hugmin42

    (@hugmin42)

    Hi,
    Pleasure. It looks great on your site.

    Another developer informed me about this problem as well. He claims that it is the API that will only return a maximum of 40 books. There might be a way to manually get the first 40 and then somehow starting with index 41 and getting the next 40.

    I haven’t had the time however to fully research this and implement a solution. My library has less than 40 books so I didn’t notice this problem at first.

    Regards

    Thread Starter Vadym

    (@vadym)

    Hi,

    I found https://developers.google.com/books/docs/v1/using#RetrievingBookshelfVolumes . There is limit in 40 items. Maybe I will try to fix this issue.

    Vadym

    Thread Starter Vadym

    (@vadym)

    Hi again!
    I have made a fix. Here is a code https://pastebin.com/DBh5XAja
    Check how it works https://v.bartko.info/?page_id=42
    Added:
    fetching all books
    caching of data to file

    It requires some cleanup, because I haven’t used php for years.

    So, if possible, feel free to add or use this code in your plugin.

    Good luck!

    Plugin Author hugmin42

    (@hugmin42)

    Wow!

    Thank you so much. I will update the code and release a new version as soon as possible

    Thank you again.

    Regards

    Plugin Author hugmin42

    (@hugmin42)

    Hi, can I place a link or something to your site to acknowledge the code that you gave me?

    Thread Starter Vadym

    (@vadym)

    Yes, you can add https://v.bartko.info

    Plugin Author hugmin42

    (@hugmin42)

    Thanks, I added it to the plugin description. One more question.

    Someone else has been experiencing problems with that plugin where it showed a different amount of books on every reload and sometimes no books at all. After he updated to the newest version of my plugin (with your new code) he just receives the “google api error” message.

    See: https://www.sidewaysthoughts.com/blog/my-bookshelf/

    Do you perhaps know what the problem could be?

    Thread Starter Vadym

    (@vadym)

    Hi,
    I found problem, but it’s very hard to fix. In short, google api has very low quota and we need to make more than one request to get all books. After just few such requests google blocks server’s api for some time.
    I will try to create workaround on this week.

    Thread Starter Vadym

    (@vadym)

    Hi,
    Here is new version https://gist.github.com/hudvin/5056246
    It works for me, but please check it anyway.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Just part of all books are shown’ is closed to new replies.