Wikibase is hardcoded to use Wikimedia Commons as file repository (T90492 https://phabricator.wikimedia.org/T90492). The imageinfo API https://www.wikidata.org/w/api.php?action=help&modules=query%2Bimageinfo can be used to get URLs for displaying. See also T76827 https://phabricator.wikimedia.org/T76827.
Il 14/08/2015 11:31, Sachini Herath ha scritto:
Hi everyone,
I’m Sachini Herath, an undergraduate from Sri Lanka. I am working on building Linked Data mapping tools for Drupal 8 as my Google Summer of Code 2015 project. The tools would enable the users to map Drupal entities to Linked Data items. Details of the project can be found in my blog. http://alongthetrail-sachini.rhcloud.com/
To select a Linked Data item, a dropdown element similar to freebase-suggest widget https://developers.google.com/freebase/v1/search-widget is being developed, but in a more generic approach so that it can be configured with any Linked Data Provider.
For Wikidata, I'm using "*wbsearchentities*" API for querying and "*wbgetentities*" for retrieving information about individual items in json format. However I could not find a way to reconstruct the url of image property for an item, so that I can fetch the image (property P18, P154 etc) for displaying. Are there any APIs or alternative methods to fetch images from Wikidata?
I would also like to hear about any optimizations that can be done for the query or alternate APIs. For example an API to return id, label, description and image urls in just one/ few call/s.
Thank you Sachini
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata