==Brief summary==
The [[ https://www.mediawiki.org/wiki/API:Main_page | MediaWiki action API ]] is a web service that allows access to some wiki-features like authentication, page operations, and search. It can provide meta information about the wiki and the logged-in user. Several Wikimedia projects make use of this API.
As of now, there are [[ https://www.mediawiki.org/wiki/Category:MediaWiki_action_API | 128 pages ]] on the Action API on MediaWiki.org. #developer-advocacy did a little [[ https://www.mediawiki.org/wiki/User:SSethi_(WMF)/Sandbox/Research_on_the_state_of_the_docs_of_mw_action_api | research on the state of the docs ]] and documented a few problems and recommendations for next steps. One of the issues we decided to address was inconsistency. For example, some pages had the automated API docs embedded; some didn’t, some pages had code samples, some didn’t, etc.
As a first step, we designed a [[ https://www.mediawiki.org/wiki/API:Documentation_template | documentation template ]] and used it to re-write the top 20 viewed pages of the API. But, we realized we could not improve 128 pages all by ourselves, and opened it to new Wikimedia contributors for help :-) The next 60 pages were improved in the last two Outreachy rounds.
The goal of this project is to improve documentation of ~20 top 100 most viewed MediaWiki Action API pages on-wiki using the documentation template.
(OPTIONAL) If there is more time, then the next part of the project could be developing a bot that mass edits sample code from [[https://github.com/wikimedia/MediaWiki-Action-API-Code-Samples|this repository]] to the API namespace on MediaWiki.org and vice-versa, as explained in https://github.com/wikimedia/mediawiki-api-demos/issues/172.
==Skills required==
- Wiki editing, Templates, creating and managing translatable pages.
- [[ https://phabricator.wikimedia.org/ | Wikimedia Phabricator ]] tool.
- Basic Python, PHP and JavaScript programming.
Note: some or all of these skills would be nice to have but not required. Come with a desire to learn and that be all!
== Code repository==
https://github.com/wikimedia/MediaWiki-Action-API-Code-Samples
== Microtasks==
==== 1. Pick a MediaWiki Action API page to review and improve====
Pick an API page to work on and add your Phabricator username next to it in the relevant column
| API page | Work in progress | Done
| [[ https://www.mediawiki.org/wiki/API:Siteinfo | API:Siteinfo ]] ||
| [[ https://www.mediawiki.org/wiki/API:Iwbacklinks | API:Iwbacklinks ]] ||
| [[ https://www.mediawiki.org/wiki/API:Pageswithprops | API:Pagewithprops ]] ||
| [[ https://www.mediawiki.org/wiki/API:Mergehistory | API:Mergehistory ]] | Zaycodes ||
| [[ https://www.mediawiki.org/wiki/API:Revisiondelete | API:Revisiondelete ]] ||
| [[ https://www.mediawiki.org/wiki/API:Expandtemplates | API:Expandtemplates ]] ||
| [[ https://www.mediawiki.org/wiki/API:ClearHasMsg | API:ClearHasMsg ]] | Barbontempo ||
| [[ https://www.mediawiki.org/wiki/API:Compare | API:Compare ]] ||
| [[ https://www.mediawiki.org/wiki/API:Contributors | API:Contributors ]] | AwahNadege ||
| [[ https://www.mediawiki.org/wiki/API:Tag | API:Tag ]] | Sabin10||
===== Getting started instructions =====
- Set up [[ https://git-scm.com/book/en/v2/Getting-Started-Installing-Git | Git ]] on your computer and a [[ https://github.com/ | Github account ]] if you don’t already have one. Learn how to use both.
- Set up a [[ https://www.mediawiki.org/wiki/MediaWiki | MediaWiki account ]] if you don’t already have one.
- Read the project description thoroughly and the [[ https://www.mediawiki.org/wiki/API:Main_page | MediaWiki Action API ]] too.
- Pick an action page from the table above that you would like to review and improve. Add your name next to the project in the “Work in progress” column. You will need to be logged into Phabricator and subscribed to the task and only then you will be able to edit the task description. Pick only one page, and only pick another after your previous page has been reviewed and merged.
- Create a page in your Sandbox (https://www.mediawiki.org/wiki/User:your_username/Sandbox/API:pagename) and do not make edits directly to the API pages.
- Fill it with the template content which is in here: https://www.mediawiki.org/wiki/API:Documentation_template (copy and paste). We encourage you to stick to the template if for some reason you feel the urge to add or remove any section, discuss with your mentors.
- For your reference, read a couple recent API pages that we modified using the new template: [[ https://www.mediawiki.org/wiki/API:Geosearch | API:Geosearch ]], [[ https://www.mediawiki.org/wiki/API:Parsing_wikitext | API:Parsing_wikitext ]]
- Contribute sample code for the API page to this repository: https://github.com/wikimedia/MediaWiki-Action-API-Code-Samples. Please read the [[ https://github.com/wikimedia/mediawiki-api-demos/blob/master/contributing.md | contribution guidelines ]] before starting to work on a topic.
- When you are done, ping @jeropbrenda on Zulip and get some feedback on your work.
- Incorporate feedback. Once you get a green signal, coordinate with mentors in getting your changes integrated with the actual page on MediaWiki.org.
- Finally, add your name next to the project in the “Done” column in the table above.
==Mentor(s)==
@jeropbrenda
==Get in touch with mentors==
Ask a question in the topic `Phab:T232816 API documentation improvements` under https://wikimedia.zulipchat.com/#narrow/stream/208145-outreachy19
== Resources ==
* How to use or write Templates https://www.mediawiki.org/wiki/Help:Templates
* Page translation https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_example
* Editing wiki pages https://www.mediawiki.org/wiki/Help:Editing
* Learn how to use Phabricator https://www.mediawiki.org/wiki/Phabricator/Help