Page MenuHomePhabricator

Add an image: Support querying for image suggestions by title
Closed, ResolvedPublic

Description

The API retrieves image suggestions for a given production article ID. For non-production environment, this doesn't work since page ID is different than production so we need the ability to query the suggestions for a given page title.

API Documentation: https://www.mediawiki.org/wiki/Platform_Engineering_Team/Data_Value_Stream/Data_Gateway#Image_Suggestions

To achieve this with the new API:

  1. Get the production page ID for the current title via title_cache endpoint (This is blocked by T311220: title_cache endpoint for image suggestions api doesn't work)
  2. Use the page ID from the previous step to query image suggestions via /public/image_suggestions/suggestions/{wiki}/{page_id}

For local development, the current workaround is to use SubpageImageRecommendationProvider to mock the API response.

Event Timeline

mewoph changed the task status from Open to Stalled.Jun 23 2022, 8:48 PM
mewoph created this task.

Change 808982 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[mediawiki/extensions/GrowthExperiments@master] Add an image: suppport querying for image suggestions by title

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

Change 808982 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add an image: suppport querying for image suggestions by title

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