Last modified: 2014-07-31 22:11:40 UTC
The getEntity() function that provides access to item data in lua returns a Lua table the reflects the structure of the data item as used by the API. This is very inconvenient for getting claims/statements and their values: In order to get all statements about property p123, one would have to loop over all claims and look at the property. Also, one would have to use the property ID. A helper function getClaims(property) should be added to the entity structure, allowing the list of claims about a given property to be accessed by simply providing the property ID or (localized) property name.
Can this be considered fixed as we now have: entity:getProperties() and entity:formatPropertyValues( 'P123' ) ?
Yes, if formatPropertyValues also allows specifying the property by name instead of ID (I don't remember).
(In reply to Daniel Kinzler from comment #2) > Yes, if formatPropertyValues also allows specifying the property by name > instead of ID (I don't remember). It doesn't (yet)...