Page MenuHomePhabricator

Commons API call to get Unstructured data for image file
Closed, ResolvedPublic

Description

This allows us to get the following data from the Commons file name :

  • Description
  • Categories
  • Camera Location
  • Licence

Parameters for call to https://commons.wikimedia.org/w/api.php

actionquery
titles[filename]
propimageinfo
iipropextmetadata

example: https://commons.wikimedia.org/w/api.php?action=query&titles=File:DIWALI_A_FESTIVAL_OF_LIGHTS.jpg&prop=imageinfo&iiprop=extmetadata

result = response.query.pages[pageId]  //Only property in response.query.pages
  • Description: result.ImageDescription
  • Categories: result.Categories
  • Camera Location: result.GPSLatitude & result.GPSLongitude
  • Licence: result.LicenseShortName

Event Timeline

NavinoEvans renamed this task from API call to get Unstructured data for image file to Commons API call to get Unstructured data for image file.May 3 2019, 11:13 PM

Change 508420 had a related patch set uploaded (by Eugene233; owner: Eugene233):
[labs/tools/Isa@master] Commons API call to get Unstructured data for image file

https://gerrit.wikimedia.org/r/508420

Change 508420 merged by jenkins-bot:
[labs/tools/Isa@master] Commons API call to get Unstructured data for image file

https://gerrit.wikimedia.org/r/508420

Change 508813 had a related patch set uploaded (by Eugene233; owner: Eugene233):
[labs/tools/Isa@master] Commons API call to get Unstructured data for image file

https://gerrit.wikimedia.org/r/508813

Change 508813 merged by jenkins-bot:
[labs/tools/Isa@master] Commons API call to get Unstructured data for image file

https://gerrit.wikimedia.org/r/508813