WordPress.org

Ready to get started?Download WordPress

Forums

My Google Books Library
[resolved] Just part of all books are shown (10 posts)

  1. Vadym
    Member
    Posted 1 year ago #

    Hi,
    Thanks a lot for you work! It works fine except one moment. I have about 80 books in my library, but only ~60 of them are shown on page. Configuration is
    [my_google_books_library shelf="4" max="150" layout="4"]

    Link http://v.bartko.info/?page_id=42
    Is is this bug or some kind of API limitation?

    http://wordpress.org/extend/plugins/my-google-books-library/

  2. hugmin42
    Member
    Plugin Author

    Posted 1 year ago #

    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

  3. Vadym
    Member
    Posted 1 year ago #

    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

  4. Vadym
    Member
    Posted 1 year ago #

    Hi again!
    I have made a fix. Here is a code http://pastebin.com/DBh5XAja
    Check how it works http://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!

  5. hugmin42
    Member
    Plugin Author

    Posted 1 year ago #

    Wow!

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

    Thank you again.

    Regards

  6. hugmin42
    Member
    Plugin Author

    Posted 1 year ago #

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

  7. Vadym
    Member
    Posted 1 year ago #

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

  8. hugmin42
    Member
    Plugin Author

    Posted 1 year ago #

    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: http://www.sidewaysthoughts.com/blog/my-bookshelf/

    Do you perhaps know what the problem could be?

  9. Vadym
    Member
    Posted 1 year ago #

    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.

  10. Vadym
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.