Hey everyone,
v1.1.5 is on its way and so we have a few API updates I'd like to share with you today. These are all live as of now and I've put some test URLs in so you can see some of the changes.
Item status: '', 'LOCKED', or 'HIDDEN'
We've added a new property to all items returned by the API named 'status'. This will either be empty (in which case everything is normal), 'LOCKED', or 'HIDDEN'. If the item is 'HIDDEN' then we won't give you any information about who owns it or where it is dropped; you will not be able to see the item at all in the API. If the item is 'LOCKED', there will be a 'user_id' property along with it so you can see who owns the item. You'll learn more about LOCKED and HIDDEN items when v1.1.5 is released so this is more of a "heads up". For example:
- /itemtypes/507/number/677 - a LOCKED item in my pouch
- /itemtypes/477/number/4043 - a HIDDEN item dropped at Ben Dodson Apps (place_id: 710625)
- /itemtypes/477/number/3635 - a LOCKED item dropped at Ben Dodson Apps
- /places/710625/items - you'll see some LOCKED items here but you won't see Horse Lords 4043 which is HIDDEN
- /items/1049847 - this is a HIDDEN item. Notice you get no place or user info.
- /items/1049847/activity - good try. That'll just error (you can't see the activity of HIDDEN items)
- /users/1/pouch - you'll see both normal and LOCKED items here. HIDDEN items don't exist in the pouch.
The thing to watch out for (and the reason I bring this up now) is that an item could have both a user_id and a place_id whereas previously it was one of the other (user_id if in pouch, place_id if at a place). Depending on the way you coded, this may work fine but the rule should be "if there is a place_id it is at a place regardless of the user_id - if there is just a user_id it's in the pouch". If there are both, that means the item is locked by a player and dropped at a place.
I'm fairly confident that all endpoints have been covered but if you discover a way to see user or place information relating to a HIDDEN item, please let me know.
Users/#
We've updated this so that the 'account_type' property will now be 'normal', 'staff', or 'beekeeper'. We've removed the 'pro' option as there are no pro accounts anymore.
If you have any questions, please let me know.