Page MenuHomePhabricator

[Feeds] Implement Content Service endpoint for "featured picture of the day"
Closed, ResolvedPublic3 Estimated Story Points

Event Timeline

MBinder_WMF set the point value for this task to 3.May 13 2016, 6:15 PM

Change 296266 had a related patch set uploaded (by BearND):
Picture of the day

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

Change 296266 merged by jenkins-bot:
Picture of the day

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

It looks like this is currently designed to fail the request if the image caption isn't available in the language for the requested domain.[1] I don't think we should fail in such a case, but instead fall back to English or no caption. What do you think?

[1] It actually doesn't fail in the way it's meant to, which is a bug I found this morning and I'm working on fixing. There's a test to check that a 504 for an unsupported language (French) is thrown, which is only passing because mwapi.checkForQueryPagesInResponse is improperly returning an error with a 200 status code, triggering the successful response branch of the test, which contains no checks, rather than the error branch, which checks for the 504.

Change 297278 had a related patch set uploaded (by Mholloway):
Update Picture of the Day endpoint

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

All right, a few more words on image description translations, probably mostly for posterity's sake:

My update patch above leverages the iiextmetadatamultilang query paramater to get a set of translations for the image description, but other translations exist that the query doesn't pick up. This is because the query looks to the descriptions template transcluded into the POTD template page to see which languages are available. The visible list on that, page, however, is a transclusion of a list of pages generated with Special:PrefixIndex, e.g.:

https://commons.wikimedia.org/wiki/Special:PrefixIndex/Template:Potd/2016-07-03

If we really wanted to get every possible translation we could probably scrape the titles/lang codes from either the POTD template page or the transcluded Special:PrefixIndex page, but for now, at least for the MVP, I'd favor just relying on iiextmetadatamultilang.

Change 297278 merged by jenkins-bot:
Update Picture of the Day endpoint

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

Change 297796 had a related patch set uploaded (by Mholloway):
Picture of the Day card, pt. 1

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

Change 297796 merged by jenkins-bot:
Picture of the Day card, pt. 1

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