BookMooch logo
 
home browse about join login
Explanation of the all-pending-mooches XML data feed
?



This is what a single pending item looks like:
<pending_item>
        <id>+magic/13</id>
        <asin>0143037145</asin>
        <date_sent>1169515351</date_sent>
        <giver>booklogged</giver>
        <now>1169177413</now>
        <points_from_receiver>20</points_from_receiver>
        <points_to_giver>30</points_to_giver>
        <receiver>+magic</receiver>
        <receiver_country>SG</receiver_country>
        <status>sent</status>
</pending_item>
Here is a version of the same record, but with an explanation in place of the field data:
<pending_item>
        <id>the ID of this pending job. IDs are created at mooch time by concatenating the userid of the
            moocher + '/' + the incremented number in the moocher's 'sequence' field.  In other words, each subsequent
            mooch by a user name 'john' would be 'john/1', 'john/2', 'john/3', etc..</id>
        <asin>Amazon ASIN of the book</asin>
        <date_sent>time-stamp the book was shipped by the book owner, in seconds-since-1970 format</date_sent>
        <giver>user id of the owner of the book who will be sending it</giver>
        <now>time-stamp of when the mooch request was first made</now>
        <points_from_receiver>how many points this book cost the moocher (all points are in 10x more than what's 
            displayed on the site, ie 10 in this field=1 point)</points_from_receiver>
        <points_to_giver>how many points were given to the book giver when this mooch request was made</points_to_giver>
        <receiver>the user id of the person receiving this book</receiver>
        <receiver_country>the country of the person receiving this book.  This is usually the same thing as 
            the country in the user's own record, but the moocher does have the option of over-riding the ship 
            to address.  The BookMooch database also contains the ship-to address, but this is not provided via
            this xml feed for privacy reasons.</receiver_country>
        <status>the current status of this transaction.  An if/then statement for interpreting what this
            status means is given below.</status>
</pending_item>
Status: here is an if/then statement that explains how to interpret the various states of the "status" field.
    if {$status == "cancelled"} {
        set status_txt "cancelled by book requestor"
    } elseif {$status == "delayed"} {
        set status_txt "will send, but currently delayed"
    } elseif {$status == "rejected"} {
        set status_txt "rejected this request"
    } elseif {$status == "lost"} {
        set status_txt "sent book, but was lost in the mail"
    } elseif {$status == "received"} {
        set status_txt "book was received by requester"
    } elseif {$status == "received_forced"} {
        set status_txt "book was sent, but requester never acknowledged receiving it"
    } 
    
All data on BookMooch (excepting that covered by the Amazon copyright in the "asins" table) is provided under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License. The data is also available under different licensing terms by special arrangement with BookMooch.