Welcome to the problem of 'there is no structured metadata for files' :)
This is a garbage in, garbage out problem and probably when you start filtering you will break attribution requirements (more than the community will appreciate).
DJ
On Mon, Dec 8, 2014 at 8:30 PM, Dan Garry dgarry@wikimedia.org wrote:
Sorry, the example query I provided was incorrect. Use this instead: https://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&forma...
Thanks, Dan
On 8 December 2014 at 11:29, Dan Garry dgarry@wikimedia.org wrote:
Greetings, Multimedia Team!
*Background:* The Mobile Apps Team is working on a restyling of the way content the first fold of content is presented in the Wikipedia app. You can see this image http://i.imgur.com/dxqfJKd.png to see what this looks like. Having a high-resolution image so prominently at the top of the page will likely drive a lot of clicks, so we're working on a lightweight image viewer to deal with file pages, which are poorly styled monstrosities on the mobile app. We're going to use the CommonsMetadata API to help us out. :-)
*Problem:* The CommonsMetadata API can sometimes return HTML [1]. Having HTML in the API response is a bit problematic for us. Native apps make next to no use of HTML when creating links or layouts, so we have to strip the HTML from every API response, lest it be displayed as plaintext to the user. In the short term this is fine, we can strip it and throw the information away. But in the long run it'd be better if the API didn't return HTML.
*Our ask: *Can the CommonsMetadata API please not return HTML in its responses? :-)
Thanks, Dan
[1]: Run this query https://commons.wikimedia.org/w/api.php?action=query&prop=imageinfo&format=xml&iiprop=extmetadata&iilimit=10&titles=File%3ACommon%20Kingfisher%20Alcedo%20atthis.jpg., and look at "artist" key. The API response has an HTML link in it.
-- Dan Garry Associate Product Manager, Mobile Apps Wikimedia Foundation
-- Dan Garry Associate Product Manager, Mobile Apps Wikimedia Foundation
Mobile-l mailing list Mobile-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mobile-l