Reviews and Ratings

Reviews

Filename: reviews.xml

Sample Feed: reviews_small.xml

Contents and Purpose

This is a feed of all the reviews available for libraries or commercial customers, together with their ratings, if any.

Example

<reviews>
    <review id="25248">
        <workcode>153539</workcode>
        <ISBN>0801825482</ISBN>
        <userid>timspalding</userid>
        <restricted>unrestricted</restricted>
        <stars>3.5</stars>
        <times>
            <written_stamp>1213413655</written_stamp>
            <edited_stamp>1213413655</edited_stamp>
        </times>
        <text>
            <![CDATA[
            Invaluable collection. Big, but it could easily be larger. If I
            were in charge, I would have left out some of the more easily-found texts.
            ]]>
        </text>
    </review>
</reviews>

Elements and Attributes

<reviews> is the top-level element.
  • <review> is repeated. It has the required attribute:
    • id="N" attr is the numerical id of the review.
    • <workcode> (required) The "workcode," or work id, to which the review belongs.
    • <ISBN> (optional) The ISBN of the edition reviewed, in shortest, usually ISBN-10 form.
    • <userid> (required) The LibraryThing user/member id of the reviewer.
    • <restricted> (required) Possible values are "unrestricted" and "libraries only." They determine which reviews you can use.
    • <stars> (optional) Number 0.5-5, in 0.5-step increments. There are no zero-star books.
    • <times> (required) encloses the creation and editing times.
      • <written_stamp> (required) UNIX timestamp of when the review was first created.
      • <edited_stamp> (required) UNIX timestamp of when the review was first edited.
    • <text> (required) The text of the review, wrapped in a CDATA element.

Ratings

Filename: worktoratings.xml

Sample Feed: worktoratings_small.xml

Contents and Purpose

This is a simple and straightforward work-to-rating stars format.

Example

<worktoratings>
    <work workcode="42">    
        <rating stars="3">6</rating>
        <rating stars="4">8</rating>
        <rating stars="4.5">3</rating>
        <rating stars="5">4</rating>
    </work>
</worktoratings>

Elements and Attributes

<worktoratings> is the top-level element.
  • <work> (repeated) is the work in question. It has the required attribute:
    • workcode="N" attr (required) is the work ID, called the "workcode."

    <rating> (repeated) contains the count of ratings at a given star-level.

    • stars="N" attr (required) is number of stars, 0.5-5, in 0.5-step increments. There are no zero-stars.
    • The element contains the count of ratings at this star-level.