HomePhabricator

Implement badges for sitelinks

Description

Implement badges for sitelinks

Introduces two new classes

SiteLink

  • extends BaseLink
  • the 'badges' property is a set of ItemPage objects converted from the list of strings returned by the API
  • strives to minimize the need for siteinfo calls
  • can be converted back to the API json format

SiteLinkCollection

  • extends dict
  • uses site dbnames (str) as keys and SiteLink objects as values
  • values can be obtained and set either via APISite objects or str

Based on https://gerrit.wikimedia.org/r/131019 by Ricordisamoa but
inheriting from BaseLink rather than Page.

Bug: T66457
Bug: T128202
Change-Id: Ia9379137b65feb2207c2be9eda8f0b928eb025d9