https://bugzilla.wikimedia.org/show_bug.cgi?id=46160

       Web browser: ---
            Bug ID: 46160
           Summary: Lua: add getClaims(property) helper function
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: WikidataClient
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to