Per {T113094}, you'll find the spec for the Page Summary API here: https://www.mediawiki.org/wiki/User:Phuedx_(WMF)/Reading/Web/Page_Preview_API
== Plan (YMMV)
# Add a route to the MobileApps service (MCS) that accepts a title and returns some JSON response.
# Get the lead section of the page.
# Get the intro from the lead section of the page (see https://www.mediawiki.org/wiki/User:Phuedx_(WMF)/Reading/Web/Page_Preview_API#Intros)
# Strip all HTML elements from the intro.
# Add the HTML elements back in case by case, e.g.
- `span`
- `a`
- `b`
- `i`
- `em`
- `sup`
- `sub`
# Flatten `a` tags (see https://www.mediawiki.org/wiki/User:Phuedx_(WMF)/Reading/Web/Page_Preview_API#Flattening_inline_elements)
# Strip balanced parentheticals.
NOTE: Disambiguation pages and Wikidata entities can and should be done separately.
== AC
[] A service exists that responds as specified in https://www.mediawiki.org/wiki/User:Phuedx_(WMF)/Reading/Web/Page_Preview_API#Responses apart from the following cases:
- [[ https://www.mediawiki.org/wiki/User:Phuedx_(WMF)/Reading/Web/Page_Preview_API#For_a_disambiguation_page | For a disambiguation page ]]
- [[ https://www.mediawiki.org/wiki/User:Phuedx_(WMF)/Reading/Web/Page_Preview_API#Responses_for_Wikidata_.28from_T111231:_Page_previews_for_Wikidata.29 | Responses for Wikidata (from T111231: Page previews for Wikidata) ]]
[] Service is running on the beta cluster
== Notes
# The Page Content API is a superset of the Page Summary API. If the Page Content Service repository has been created prior to working on this, then add this endpoint there.