Goodreads Developers discussion
questions
>
Goodreads' APi and CakePHP
date
newest »


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!

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

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).

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


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.

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.
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