Page MenuHomePhabricator

๐Ÿ–‡๏ธ Read all sitelink data of an item
Closed, ResolvedPublic5 Estimated Story Points

Description

Description:
As tool builder I want to read data of all sitelinks of an item so that I can use them in my tool.

Acceptance criteria:

  • Following endpoint is developed:

GET /entities/items/{item_id}/sitelinks

  • Following error cases have to be considered:
HTTP response coderesponse payload
Item does not exist404"code": "item-not-found"
"message": "Could not find an item with the ID: {item_id}"
Invalid item ID400"code": "invalid-item-id"
"message": "Not a valid item ID: <ITEM_ID>"

Notes:

  • Handle HTTP conditional request headers as in GET /entities/items/{item_id}/statements
  • Handle user authentication/authorization like in GET /entities/items/{item_id}/statements
  • Items that have been redirected should be handled like GET /entities/items/labels
  • 200 response format should be the same as the contents of the sitelinks field in a GET /entities/items/{item_id} response

Possibly relevant pointers:

Task breakdown notes

  • add GET /entities/items/{item_id}/sitelinks to OAS
  • create SiteLinksRetriever interface and implementation
    • using SiteLinkLookup::getSiteLinksForItem() and SiteLinksReadModelConverter
  • happy path
  • validation
  • item existence check and redirect handling
  • middlewares + e2e tests and RouteHandlersTest
  • spec tests
  • mark ready for prod

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptAug 11 2023, 7:46 AM
Jakob_WMDE renamed this task from Read all sitelink data of an item to ๐Ÿ–‡๏ธ Read all sitelink data of an item.Dec 20 2023, 10:29 AM
Jakob_WMDE updated the task description. (Show Details)