On 04/12/2017 05:57 PM, Magnus Manske wrote:
Just say "wd:Q12345" (the author) instead of "?author" ?
Yes, that is what we do all over in Scholia, e.g., https://tools.wmflabs.org/scholia/author/Q13520818
The backlinks thing works, but is tedious. You'll need to load the items via action=wbgetentities to check if that link actually means "author", or some other property.
We got a question from a reviewer asking why we used SPARQL in Scholia and not just MediaWiki API. My initial thought was that it was not possible with MediaWiki API, but then I thought of list=backlinks and followed by (as Magnus points out) action=wbgetentities.
I was afraid that some place hidden in the MediaWiki API would be a query functionality so you could get Wikidata property-filtered backlinks, but since Magnus don't point to them, I am pretty sure now that no such functionality exists. :)
/Finn
On Wed, Apr 12, 2017 at 4:52 PM <fn@imm.dtu.dk mailto:fn@imm.dtu.dk> wrote:
To get the works that an person has written It would use SPARQL with something link "SELECT * WHERE { ?work wdt:P50 ?author }". I could also get the authors of a work via Wikidata MediaWiki API. My question is whether it is possible to get the works of an author given the author. With my knowledge of the API, I would say it is not possible, except if you do something "Special:WhatLinksHere" (list=backlinks) and process/filter all the results. Finn Årup Nielsen http://people.compute.dtu.dk/faan/ _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org <mailto:Wikidata@lists.wikimedia.org> https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata