Goodreads Developers discussion

14 views
questions > See the current user's notifications

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

message 1: by Gregg (new)

Gregg (greggmarshall) | 105 comments Working my way down the API list, I can get a response via OAuth for the "empty" request (e.g. no parameters). It appears to respond with 50 items.

If I add the max_updates parameter, I got a different number of results than I would have expected, my query (without the OAuth in the header) looked like http://www.goodreads.com/updates/frie...
and I got 16 responses. 30 gave me 26 responses, 10 gave me 6, and 50 gave me 46. Trying it with 75 gives me 50 (I presume any number greater than 53 will return 50)

If I try other parameters, occasionally I get no response, as in my API call "hangs" waiting for a response from Goodreads (I am guessing my low level communication isn't timing out like it should). I did finally get 21 responses to
http://www.goodreads.com/updates/frie...

any ideas???


message 2: by Michael (new)

Michael Economy (michaeleconomy) Oh... that api will group stuff (after the limit). so if you did 3, and 2 are bob likes phils review of twilight and jake likes phil's review of twilight, it combines those into: bob and jake like phil's review of twilight.


Does that explain it?

The slowness might be pretty common recently unfortunately. We're handling a lot of traffic at the moment, and need to do some performance work.


message 3: by Gregg (new)

Gregg (greggmarshall) | 105 comments So if I understand what you are saying, I tell the API to return 20 notifications, it pulls 20 notifications and THEN does some kind of grouping?

As opposed to doing the grouping then returning the number of notifications asked for?

Also since 50 notifications appears to be the limit (which I've seen with other API calls), does this API support paging to get more than 50 (not sure the use case, just crawling through the API's as of right now).


message 4: by Michael (new)

Michael Economy (michaeleconomy) It does have some paging, but it's a little weird. It uses a max_updated_at (timestamp) parameter or max_update_id (primary key) (depending on the type of updates).

You'd derive that by getting the youngest of all the updates that are returned and selecting the id or timestamp of that update.


If you look at the home page, for the same types of updates (the more updates button) that might make a little bit of sense.



(paginating was added as an afterthough here).


I haven't updated the docs because it's kinda hard to understand (i think I'm the only one who even knows how this code works sadly).


back to top