Dragma

Sets in set call.

Recommended Posts

Just wondering,  is there a reason why the set objects in the:/api/v3/lego/sets/{set_num}/sets/ dose not return the same info as the /api/v3/lego/sets/{set_num}/?

for example:  looking up K3731-1 in the first returns:

"results": [
    {
      "id": 2010,
      "set_num": "3731-1",
      "set_name": "Pumpkin Pack",
      "quantity": 2,
      "set_img_url": "https://m.rebrickable.com/media/sets/3731-1.jpg"
    }

While  3731-1 in the latter returns:
 

{
  "set_num": "3731-1",
  "name": "Pumpkin Pack",
  "year": 2000,
  "theme_id": 230,
  "num_parts": 87,
  "set_img_url": "https://m.rebrickable.com/media/sets/3731-1.jpg",
  "set_url": "https://rebrickable.com/sets/3731-1/pumpkin-pack/",
  "last_modified_dt": "2011-09-05T14:00:00Z"
}

Basically if you want to get all the info about a set that is contained within a set you need multiple calls. why not have them both return the same object with the single one setting a quantity of 1?

Share this post


Link to post
Share on other sites

The basic idea is that the lists of items returns fewer details as it can potentially be a much larger response. I tried to only include the bare essentials in the list results.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now