Skip to content

Commit

Permalink
Small README improvements before next tag
Browse files Browse the repository at this point in the history
  • Loading branch information
addwiki-ci committed Feb 2, 2021
1 parent dbdb4b8 commit 9506414
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@
[![Latest Stable Version](https://poser.pugx.org/addwiki/mediawiki-api-base/version.png)](https://packagist.org/packages/addwiki/mediawiki-api-base)
[![Download count](https://poser.pugx.org/addwiki/mediawiki-api-base/d/total.png)](https://packagist.org/packages/addwiki/mediawiki-api-base)

This library provides basic access to the MediaWiki Action API.
This library features simple methods allowing you to login, logout and do both GET and POST requests.
This library should work with most if not all MediaWiki versions due to its simplicity.

You can find the fill documentation at https://addwiki.github.io/mediawiki-api-base/

## Example

A quick example can be found below:

```php
use \Mediawiki\Api\MediawikiApi;

$api = MediawikiApi::newFromPage( 'https://en.wikipedia.org/wiki/Berlin' );
$api->login( new ApiUser( 'username', 'password' ) );
$purgeRequest = FluentRequest::factory()->setAction( 'purge' )->setParam( 'titles', 'Berlin' );
$api->postRequest( $purgeRequest );
```

## Integration tests

Run the MediaWiki test site:
Expand Down

0 comments on commit 9506414

Please sign in to comment.