diff --git a/README.md b/README.md index 2fdbca4..01be02c 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,70 @@ # boz-mw This is another MediaWiki API handler in PHP. ## Tools See [the tools](./tools/README.md). ## API showcase Here some usage examples. ### Basic API query ```php fetch( [ 'action' => 'query', 'prop' => 'info', 'titles' => [ 'Pagina principale' ] ] ); print_r( $response ); ``` ### API query with continuation -``` +```php $wiki = \wm\WikipediaIt::instance(); $queries = $wiki->createQuery( [ 'action' => 'query', 'list' => 'categorymembers', 'cmtitle' => 'Categoria:Software con licenza GNU GPL', ] ); foreach( $queries as $query ) { print_r( $query ); } ``` ### Edit API query -``` +```php $wiki = \wm\WikipediaIt::instance(); $user = ''; $password = ''; $wiki->login( $user, $password ); $w->edit( [ 'title' => 'Special:Nothing', 'text' => 'My wikitext', 'summary' => 'My edit summary', ] ); ``` ## Known usage * [ItalianWikipediaDeletionBot](https://github.com/valerio-bozzolan/ItalianWikipediaDeletionBot) * [wiki-users-leaflet](https://github.com/valerio-bozzolan/wiki-users-leaflet/) hosted at [WMF Labs](https://tools.wmflabs.org/it-wiki-users-leaflet/)