Goodreads Developers discussion

43 views
bugs > shelf/list.xml returns incorrect information

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

message 1: by Karsten (last edited Jun 26, 2012 03:52AM) (new)

Karsten (strobaek) | 37 comments The value for 'sort' does not reflect the actual setting. It is always empty no matter what is checked on the web page.

Karsten


message 2: by Karsten (last edited Jun 26, 2012 03:52AM) (new)

Karsten (strobaek) | 37 comments Same goes for 'recommend_for'. Always true.


message 3: by Michael (new)

Michael Economy (michaeleconomy) I'm opening a ticket for this.


message 4: by Karsten (new)

Karsten (strobaek) | 37 comments Michael,

Any new info on this?

Karsten


message 5: by Brian (new)

Brian (bper) | 24 comments I've submitted a fix for code review, so should be released friday or monday. Thanks for finding this! Should also provide correct 'order' values as well.


message 6: by Brian (new)

Brian (bper) | 24 comments Should be released on Monday sometime.


message 7: by Karsten (new)

Karsten (strobaek) | 37 comments Brian,

There is still something odd going on. When I look at my shelves (in the browser) I see the following concerning ordering:
to-read: position (desc)
currently-reading: date-read (desc)

The is the XML I get when calling shelf/list.xml:
to-read: positiona
currently-reading:

I can understand that the value for sort for to-read is position, but why is it "blank" for currently-reading? Why is that not date_read? Also both shelves have order as decending, but the order for to-read is "a" - does this indicate accending? - and "blank" for currently-reading?

Please advise.

Karsten


message 8: by Brian (new)

Brian (bper) | 24 comments Not sure I get the picture of what your response is. can you give me a snippet of the XML? cause this is what i see for your to-read:

<user_shelf>
<book_count type="integer">26</book_count>
<description nil="true"/>
<display_fields/>
<exclusive_flag type="boolean">true</exclusive_flag>
<featured type="boolean">false</featured>
<id type="integer">...</id>
<name>to-read</name>
<order>a</order>
<per_page type="integer" nil="true"/>
<recommend_for type="boolean">true</recommend_for>
<sort>position</sort>
<sticky type="boolean" nil="true"/>
</user_shelf>

so there's a node for position and a separate one for order. yes, for order, 'a' is ascending, 'd' should be for descending and nil will be default (i would have thought default in our display is ascending, but not sure). i checked in the db as well, and your ordering is definitely set to ascending for to-read there, for what it's worth. not sure why the my books page would be showing it as descending, weird.

as for your currently-reading, yeah, if you haven't specifically set an order on the shelf, then you'll get nil for sort and order...in which case, i believe our UI defaults to date added, ascending. i don't imagine we'll insert those defaults into the response any time soon, but on the other hand, i don't imagine we'll be changing the defaults either, so you could potentially assume those on your end to be in line with the my books page.

that answer everything?


back to top