Goodreads Developers discussion

106 views
questions > Goodreads' APi and CakePHP

Comments Showing 1-9 of 9 (9 new)    post a comment »
dateUp arrow    newest »

message 1: by Jim (new)

Jim Lafleur | 4 comments No results matched my search, when I tried to search "Cakephp" in here.
I'd like to use goodreads' api to build a simple CakePHP application (which simply display all my goodreads' books... I think I have to use the owned_books.list function), but I don't understand how to use the CakePHP plugin for goodreads.
The twitter example is very specific.
Can you help me?
Thank you very much


message 2: by Michael (new)

Michael Economy (michaeleconomy) this guy was doing some stuff with php:
http://www.goodreads.com/topic/show/4...

I don't know much about php, and goodreads has no php developers on payroll, but i believe a few of the other developers in this forum are using it, so maybe someone else will chime in.

Goodluck!


message 3: by Jim (new)

Jim Lafleur | 4 comments Thank you very much for your reply and greetings.


message 4: by Justin (new)

Justin Ray | 11 comments Hi Jim,

I tried CakePHP a few years ago and couldn't get into it, so I am not sure how to implement the Goodreads API with it. To be honest, Cake is probably overkill for something so simple. You can spend a lot of effort to get everything installed and running, set up your plugin, MVCs, etc, all to do something that can be accomplished with a couple dozen lines of PHP code.

I have a PHP library here:
http://www.314pies.com/projects/goodr...

It is basically a collection of functions and objects that that help you submit Goodreads queries and process the results.

Maybe if you can be more specific about the problem you are having, I can give you more tips.

Best,
Justin


message 5: by Jim (new)

Jim Lafleur | 4 comments Hi Justin, thank you very much for your reply.
I think CakePHP is a great tool and I use it for almost my applications, because it allows me to quickly build and manage all that I want.
Of course I agree with you: it's useless spend one entire week trying to have things running in Cake, when I can do same things in pure PHP.
I'd just like to try a little bit more.

I'm just thinking to manage my school's little library (6/700 books) via Goodreads. My idea was to use my school's GR account as a "server", and then build an application that allows me to display books and perform actions on them (view, comment, rate and over all manage loanings).


message 6: by Justin (new)

Justin Ray | 11 comments A couple of thoughts:

First, the API library I wrote only works on the part of the API that does not require OAUTH. I spent some time trying to get PHP OAUTH working, and in the end was not successful. It may be that PHP OAUTH has come a long way since then, but I am not sure.

For a library application, what functionality are you looking for from the GR API? I imagine you could show info from the Goodreads database about the books (by looking up by ISBN), but you will still need to maintain your own database of books and library users for lending purposes. It's just one more step to include the book information in your own database and not have any outside dependencies.

You might also look at Koha, open library software:
http://www.koha.org/main.asp?page=1030

Best,
Justin


message 7: by Michael (new)

Michael Economy (michaeleconomy) If you're just fetching book data, you might not need oauth. You'd definitely need oauth if you wanted to store the list of books on a goodreads user account.


message 8: by Jim (new)

Jim Lafleur | 4 comments @Justin and @Michael, I start feeling very stupid now.
I thought I would need the function owned_books.list (List books owned by a user) to do what I would like to do but that function requires OAuth.

In fact I need to mantain active my library's Goodread account because I will have to add books, sometimes delete some of them (the ones who get lost, for examples), and so on.

I would re-fill my database only when something on said GR account changes.


message 9: by Justin (new)

Justin Ray | 11 comments If the database refill is a (semi-)manual process, you could probably write an export routine in any language with a mature oauth library and create a csv dump that you can then import using PHP or an sql client. I have been working with Python lately, and have found it very nice for text manipulation. It's also nice to have a full-fledged scripting language that will work on Windows. If you do go the python route, use 2.6 or 2.7. 3.1 is nicer in some ways, but all the older third party libraries are only compatible with the 2.x syntax.

That said, it sounds like it might be less work to write add and delete function for your own database (since that is a more familiar task than hashing out the oauth stuff). You could set up the add interface to populate the author/title/etc fields from the GR book.show or the amazon API directly. That way you'd only have to enter (or scan, if you have a barcode scanner) the ISBN number of the book you are adding.

I set up a similar system years ago using a QueCat scanner. The only thing that was complicated was writing a javascript routine to translate the QueCat input, since it dumped encoded text, not the scanned barcode value directly. With it, I was able to populate a database or about 400 books in just a day.

I think the code for what I was working on is gone, but you'd be better off starting from scratch anyway since there are much better tools available these days.


back to top