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
Once you have the file name, you can construct the file URL (description page, high-res image, and thumbnails) via this API:
https://commons.wikimedia.org/w/api.php?action=help&modules=query%2Bimag...
Example: https://commons.wikimedia.org/w/api.php?action=query&titles=File:Albert%...
On Fri, Aug 14, 2015 at 10:32 AM Sachini Herath sachini.mc@gmail.com wrote:
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
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
On Fri, Aug 14, 2015 at 11:31 AM, Sachini Herath sachini.mc@gmail.com wrote:
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 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.
The project looks really interesting! Please keep us posted on your progress.
Cheers Lydia
Sachini Herath, 14/08/2015 11:31:
However I could not find a way to reconstruct the url of image property for an item, so that I can fetch the image
Images are on Commons: you can do https://commons.wikimedia.org/wiki/Special:Redirect/file/Example.jpg or https://commons.wikimedia.org/wiki/Special:Redirect/file/Example.jpg?width=4... (replace with the preferred pixel size).
Nemo