tpederzani

Output Of Get_Part_Sets

Recommended Posts

I'm just starting to tinker with the API.  The XML output of Get_Part_Sets seems to be just a stream of set_id, set name, and num_parts.  Should those three elements be wrapped in a <Set> or similar?  This would be more in line with the get_user_parts, get_set_parts, and get_user_lost_parts that I've already used.

 

This is what I'm getting:

<?xml version="1.0"?>
<root>
    <set_id>8898-1</set_id>
    <name>Wreckage Road</name>
    <num_parts>4</num_parts>
    <set_id>9456-1</set_id>
    <name>Spinner Battle Arena</name>
    <num_parts>4</num_parts>
</root>

I think something like this would make sense.  (Maybe even all nested in <sets> -- but the format below is enough for me to avoid special casing the result parsing.)

<?xml version="1.0"?>
<root>
    <set>
        <set_id>8898-1</set_id>
        <name>Wreckage Road</name>
        <num_parts>4</num_parts>
    </set>
    <set>
        <set_id>9456-1</set_id>
        <name>Spinner Battle Arena</name>
        <num_parts>4</num_parts>
    </set>
</root>

Having an exposed API is awesome, Nathan.  Thank you for creating it, and rebrickable.

Share this post


Link to post
Share on other sites