1Gwendydd
I think what I want to do is impossible, but I want to be sure...
Is there a way to use the LibraryThing API to add a book to my catalog?
I'm trying to make a good way to keep LibraryThing and Goodreads in sync. I strongly prefer LibraryThing over Goodreads, but a lot of my friends are only on Goodreads, so I use both and it's annoying posting my reviews in both places. Ideally, I would like to be able to write a review on my WordPress blog, and then write a WordPress plugin that will automatically add the book to Goodreads and LibraryThing with APIs. However, as far as I can tell, LibraryThing's API will not let you add books to your catalog via the API. Is that correct?
Thanks!
Is there a way to use the LibraryThing API to add a book to my catalog?
I'm trying to make a good way to keep LibraryThing and Goodreads in sync. I strongly prefer LibraryThing over Goodreads, but a lot of my friends are only on Goodreads, so I use both and it's annoying posting my reviews in both places. Ideally, I would like to be able to write a review on my WordPress blog, and then write a WordPress plugin that will automatically add the book to Goodreads and LibraryThing with APIs. However, as far as I can tell, LibraryThing's API will not let you add books to your catalog via the API. Is that correct?
Thanks!
2divinenanny
Unfortunately yes. There is no API to add reviews (or books).
What I did was write a script in Selenium that takes the data from my own database (MySQL) and fill in fields in the Manual Add page automatically. The only things I do manually are collections, covers and "from where?". You could do something similar using the WordPress database as a source.
What I did was write a script in Selenium that takes the data from my own database (MySQL) and fill in fields in the Manual Add page automatically. The only things I do manually are collections, covers and "from where?". You could do something similar using the WordPress database as a source.
3Gwendydd
Thanks for confirming that, divinenanny! At this point, I'm thinking I will write a Chrome extension, and every time you click "save" on a book page, the extension will add/update the book in Goodreads and WordPress. If I come up with something that works, I'll post it here!
4thcipriani
Blerg. I had the same question. It seems like it should be trivial functionality.
It's bizarre, there's an alexa skill that is capable of adding books to an account via ISBN( https://www.amazon.com/LibraryThing-com-LibraryThing/dp/B07B4L1L2H ). I made (the possibly incorrect) assumption that this was accomplished via the thingAuth api (play on "OAuth") that should authorize an application to make modifications as a user (I was guessing).
I filled https://www.librarything.com/topic/302374 hoping this was a documentation oversight (I'm still holding out hope).
Alternatively could someone fight their way through this using curl and saving cookies somewhere? Dunno.
It's bizarre, there's an alexa skill that is capable of adding books to an account via ISBN( https://www.amazon.com/LibraryThing-com-LibraryThing/dp/B07B4L1L2H ). I made (the possibly incorrect) assumption that this was accomplished via the thingAuth api (play on "OAuth") that should authorize an application to make modifications as a user (I was guessing).
I filled https://www.librarything.com/topic/302374 hoping this was a documentation oversight (I'm still holding out hope).
Alternatively could someone fight their way through this using curl and saving cookies somewhere? Dunno.
5halloleo
>4 thcipriani: Does this thingAuth exist - or is it your play on "OAuth"?
7halloleo
>6 divinenanny: Thanks a lot for the clarification. :-)
From what I can see on that page I can read profiles with this, right? Can I fetch user's book data with this as well?
From what I can see on that page I can read profiles with this, right? Can I fetch user's book data with this as well?
8divinenanny
>7 halloleo:
Your app can read the profile and book data (I think) of the user that is logged in through thingAuth, not all users. That's how I read the docs.
Your app can read the profile and book data (I think) of the user that is logged in through thingAuth, not all users. That's how I read the docs.
9halloleo
>8 divinenanny: Cool! Thanks.
10m_z
I am curious if this functionality has been added (or if it is even in the plans)?
I would like to set up (probably) a bash script to add books to my library directly from my command line, without having to use the browser at all. And also to pull from my database and display it in my terminal. Update books with ratings and reviews etc.
I would like to set up (probably) a bash script to add books to my library directly from my command line, without having to use the browser at all. And also to pull from my database and display it in my terminal. Update books with ratings and reviews etc.
11divinenanny
It hasn't been added, I don't know about plans. The entire API is currently disabled because of work on LT2. I still hope that a modern API with adding books will be added sometime in the future.
Personally I use Selenium on headless Chrome to "manually" add books, maybe that is something that can help for now.
Personally I use Selenium on headless Chrome to "manually" add books, maybe that is something that can help for now.