Please refrain from posting animated GIFs, memes, joke videos and so on in discussions other than those in the off topic area.

Dismiss this message to confirm your acceptance of this additional forum term of use.
You must be 16 or over to participate in the Brickset Forum. Please read the announcements and rules before you join.

API questions

RexfelisRexfelis Snohomish, WAMember Posts: 13
1. What's the best way to determine (from getSets/getSet results) whether a set is considered "retired"?
2. Any reason why getCollectionTotals doesn't include total distinct minifigs owned?

Comments

  • HuwHuw Brickset Towers, Hampshire, UKAdministrator Posts: 5,849
    1. Use the 'USDateRemovedFromSAH' field. If blank but 'USDateAddedToSAH' isn't, then it's retired.

    2. Not sure, I'll look into it!
  • RexfelisRexfelis Snohomish, WAMember Posts: 13
    Huw said:
    1. Use the 'USDateRemovedFromSAH' field. If blank but 'USDateAddedToSAH' isn't, then it's retired.
    That seems...backwards. If 'USDateAddedToSAH' is not blank, but 'USDateRemovedFromSAH' is, that would seem to indicate to me that it's NOT retired.
  • HuwHuw Brickset Towers, Hampshire, UKAdministrator Posts: 5,849
    edited October 20
    Doh, yes you're right. 

    If
    USDateAddedToSAH is not blank, then the set is/was sold at s@h
    USDateRemovedFromSAH is not blank as well then the set was sold at s@h but isn't any more.

  • RexfelisRexfelis Snohomish, WAMember Posts: 13
    @Huw
    Some more questions today:
    1. How is 'Set Type' determined? Or is it just a field not exposed in the API?
    2. Is 'Price Per Piece' calculated or stored somewhere? (or retrieved from Bricklink or another database)
    2. Any chance of 'Tags' and 'Age Range' being added to the API?
  • HuwHuw Brickset Towers, Hampshire, UKAdministrator Posts: 5,849
    1. It's not part of the Sets class output by the API for some reason. It's determined nu a number of factors, set number, whether it's numeric, whether it's gear, book etc.

    2. Not stored, calculated as part of the database view and easily done by any client

    3. Maybe!
Sign In or Register to comment.
Recent discussions Categories Privacy Policy