Open pebbie opened 4 years ago
It seems not yet implemented although it is used as example in the documentation. This code below should fix it
def get(self, entity_id, property_id=None, rank=None): """Get claims for the specified entity :param entity_id: Entity identifier (e.g. ``"Q1"``) :type entity_id: str :param property_id: Property identifier (e.g. ``"P1"``) :type property_id: str :param rank: Optional filter to return only the claims that have the specified rank (one of ``["deprecated", "normal", "preferred"]``) :type rank: str :return: Response :rtype: dict """ params = { "action": "wbgetclaims", "entity": entity_id, } if property_id is not None: params['property'] = property_id if rank is not None: params['rank'] = rank return self.api.get(params)
I also was confused by the documentation, which references nonexisting .get method, see:
.get
https://wikibase-api.readthedocs.io/en/latest/api_reference/models/claim.html
It seems not yet implemented although it is used as example in the documentation. This code below should fix it