https://bugzilla.wikimedia.org/show_bug.cgi?id=61956

            Bug ID: 61956
           Summary: Better API for Picture of the Day
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: API
          Assignee: wikibugs-l@lists.wikimedia.org
          Reporter: bugzi...@hadess.net
                CC: bjor...@wikimedia.org, bryan.tongm...@gmail.com,
                    roan.katt...@gmail.com, s...@reedyboy.net
       Web browser: ---
   Mobile Platform: ---

I'm trying to create a Grilo[1] source for the Wiki Commons Picture of the day.

Ideally, the API server side would look at bit like the one used by the
Guardian:
http://explorer.content.guardianapis.com/#/search?tag=world%2Fseries%2Feyewitness%2Ctype%2Fpicture&show-fields=all

This shows me separate fields for each interesting bits of metadata (title,
author, publication date, thumbnail URL, etc.)

In contrast to the Wikimedia API which requires me to do something like:
https://commons.wikimedia.org/wiki/Special:ApiSandbox#action=expandtemplates&format=json&text=%3Citem%3E%3Cfilename%3E%7B%7BTemplate%3APotd%2F2014-02-03%7D%7D%3C%2Ffilename%3E%20%3Ctitle%3E%7B%7BTemplate%3APotd%2F2014-02-03_(en)%7D%7D%3C%2Ftitle%3E%3C%2Fitem%3E%20%3Citem%3E%3Cfilename%3E%7B%7BTemplate%3APotd%2F2014-02-02%7D%7D%3C%2Ffilename%3E%20%3Ctitle%3E%7B%7BTemplate%3APotd%2F2014-02-02_(en)%7D%7D%3C%2Ftitle%3E%3C%2Fitem%3E

And parse the unstructured items by hand to get the titles, and further:
https://commons.wikimedia.org/wiki/Special:ApiSandbox#action=query&prop=imageinfo&format=json&iiprop=timestamp%7Cuser%7Cuserid%7Ccomment%7Cparsedcomment%7Ccanonicaltitle%7Curl%7Csize%7Cdimensions%7Csha1%7Cmime%7Cthumbmime%7Cmediatype%7Cmetadata%7Ccommonmetadata%7Cextmetadata%7Carchivename%7Cbitdepth%7Cuploadwarning&iilimit=1&titles=File%3ANickel_electrolytic_and_1cm3_cube.jpg

To get the thumbnail and file URLs (I haven't figured out how to get those
details for multiple files yet).

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to