Reading/Web/Projects/NewMobileWebsite/API Inventory
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date. |
An API driven mobile site will need to make use of a variety of APIs to replicate functionality of the existing mobile experience. These are documented here.
High traffic
editThese apis are likely to be hit frequently as they would need to be commonly used.
Feature | Notes | MWAPI | RESTBase API | Usage examples |
---|---|---|---|---|
Page views/revision view | There are various pending changes to this API that are blocked on apps and live in
the new /formatted/:title/:revision? endpoint. These relate to infobox, lead paragraph positioning The changes provide easy access to hatnote and issues. They also clarify reference sections and fix link rewriting. |
/mobile-sections/:title/:revision?
/formatted/:title/:revision? |
weekapedia | |
Styles | Specific styles and scripts needed to properly render the page | prop=modules |
Moderate traffic
editWe may want to consider porting some of these to REST base based on anticipated usage.
Feature | Notes | MWAPI | RESTBase API | Usage examples |
---|---|---|---|---|
Category:Title pages | Can create a less cluttered interface | categorymembers | weekapedia | |
Special:Categories | We may want to formalise this and output to pages to avoid client side hackery
and make it behave consistent with other endpoints. |
allcategories | weekapedia | |
Special:RecentChanges | Haven't explored how to recreate the filter.
We may want to formalise this and output to pages to avoid client side hackery and make it behave consistent with other endpoints. |
recentchanges | weekapedia | |
Special:Contributions | We may want to formalise this and output to pages to avoid client side hackery
and make it behave consistent with other endpoints. |
usercontrs | weekapedia | |
Special:MobileDiff | There is no API available for a mobile friendly diff view.
We can create a new one by using the revisions api. See example. |
|||
Languages for language overlay | Already using this in MobileFrontend.
We may want to formalise this and output to pages to avoid client side hackery and make it behave consistent with other endpoints. |
langlinks | ||
Nearby | Already using this in MobileFrontend. Client needs to sort by distance.
We may want to formalise this and output to pages to avoid client side hackery and make it behave consistent with other endpoints. |
geosearch | weekapedia | |
Page history | We may want to formalise this and output to pages to avoid client side hackery
and make it behave consistent with other endpoints. |
revisions | weekapedia | |
Random | Not clear if we want to turn the random feature into a feed or keep it as it is. | generator=random | weekapedia | |
Search overlay | already using in MobileFrontend | prefixsearch | ||
Special:Search | We may want to formalise this and output to pages to avoid client side hackery
and make it behave consistent with other endpoints. |
search | weekapedia | |
watched | To render the watchstar an additional request will be needed by logged in users
on all page views to know if a page is watched or not. |
prop=info&inprop=watched | ||
Special:Watchlist | We may want to formalise this and output to pages to avoid client side hackery
and make it behave consistent with other endpoints. |
list=watchlist | ||
Special:EditWatchlist | We may want to formalise this and output to pages to avoid client side hackery
and make it behave consistent with other endpoints. |
generator=watchlistraw | ||
Image overlay | We already use mediawiki api for this in MobileFrontend | imageinfo |
Lower traffic
editThese APIs are low traffic so we can probably reply on api.php
Feature | Notes | MWAPI | RESTBase API | Usage examples |
---|---|---|---|---|
Editing | Already using this in MobileFrontend. Requires authentication. | action=edit, wikitext | ||
Special:Uploads | Already using this in MobileFrontend. | generator=allimages | weekapedia | |
References drawer | Can use page HTML as it does currently or make use of the new reference endpoint | /references/:title/:revision? | ||
change watch status | Already using in MobileFrontend. | watch/unwatch | ||