Note: this task is being implemented on the web team and the scope is totally defined in the subtask. This task serves as a marker for how it is integrated into the PCS as a whole.
At a high level, this is tracking the work being performed to create the next version of the RESTBase Summary API here: https://en.wikipedia.org/api/rest_v1/#!/Page_content/get_page_summary_title
The primary new features of the end point include:
- Normalization of title properties
- URLs for commonly needed content
- An improved extract of the page
- Handling of summaries for "not normal" pages (i.e. disambiguation pages)
Current example output:
{ "type": "standard", "title": "Laredo, Texas", "displaytitle": "Laredo, Texas", "namespace": { "id": 0, "text": "" }, "titles": { "canonical": "Laredo,_Texas", "normalized": "Laredo, Texas", "display": "Laredo, Texas", }, "pageid": 136773, "thumbnail": { "source": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/Webb_County_Laredo.svg/320px-Webb_County_Laredo.svg.png", "width": 320, "height": 238 }, "originalimage": { "source": "https://upload.wikimedia.org/wikipedia/commons/9/91/Webb_County_Laredo.svg", "width": 982, "height": 730 }, "lang": "en", "dir": "ltr", "revision": "808369737", "tid": "808ed2b1-c464-11e7-84fe-e94e48c317f5", "timestamp": "2017-11-02T13:26:55Z", "description": "border city in Texas, USA", "coordinates": { "lat": 27.524445, "lon": -99.490593 }, "content_urls": { "desktop": { "page": "https://en.wikipedia.org/wiki/Laredo,_Texas", "revisions": "https://en.wikipedia.org/wiki/Laredo,_Texas?action=history", "edit": "https://en.wikipedia.org/wiki/Laredo,_Texas?action=edit", "talk": "https://en.wikipedia.org/wiki/Talk:Laredo,_Texas" }, "mobile": { "page": "https://en.m.wikipedia.org/wiki/Laredo,_Texas", "revisions": "https://en.m.wikipedia.org/wiki/Special:History/Laredo,_Texas", "edit": "https://en.m.wikipedia.org/wiki/Laredo,_Texas?action=edit", "talk": "https://en.m.wikipedia.org/wiki/Talk:Laredo,_Texas" } }, "api_urls": { "summary": "https://en.wikipedia.org/api/rest_v1/page/summary/Laredo,_Texas", "mobile_sections": "https://en.wikipedia.org/api/rest_v1/page/mobile-sections/Laredo,_Texas", "edit_html": "https://en.wikipedia.org/api/rest_v1/page/html/Laredo,_Texas", "talk_page_html": "https://en.wikipedia.org/api/rest_v1/page/html/Talk:Laredo,_Texas" }, "extract": "Laredo is the county seat of Webb County, Texas, United States, located on the north bank of the Rio Grande in South Texas, across from Nuevo Laredo, Tamaulipas, Mexico. According to the 2010 census, the city population was 236,091, making it the tenth-most populous city in the state of Texas and third-most populated on the Mexico–United States border, after San Diego, California, and El Paso, Texas. Its metropolitan area is the 178th-largest in the \nU.S. and includes all of Webb County, with a population of 250,304. Laredo is also part of the cross-border Laredo-Nuevo Laredo Metropolitan Area with an estimated population of 636,516.", "extract_html": "<p><b>Laredo</b> is the <span>county seat</span> of <span>Webb County, Texas</span>, United States, located on the north bank of the <span>Rio Grande</span> in <span>South Texas</span>, across from <span>Nuevo Laredo</span>, <span>Tamaulipas</span>, <span>Mexico</span>. According to the <span>2010 census</span>, the city population was 236,091, making it the <span>tenth-most populous</span> city in the <span>state</span> of <span>Texas</span> and third-most populated on the <span>Mexico–United States border</span>, after <span class=\"mw-redirect\">San Diego, California</span>, and <span>El Paso, Texas</span>. Its <span>metropolitan area</span> is the <span class=\"mw-redirect\">178th-largest in the \nU.S.</span> and includes all of Webb County, with a population of 250,304. Laredo is also part of the cross-border <span class=\"mw-redirect\">Laredo-Nuevo Laredo Metropolitan Area</span> with an estimated population of 636,516.</p>" }