Skip to content

Commit be04ff5

Browse files
committed
Prepare 2.0.0 release
1 parent 5dad3c3 commit be04ff5

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,20 @@ addwiki/mediawiki-api-base is a PHP HTTP client wrapped around guzzle that makes
2020

2121
Use composer to install the library and all its dependencies:
2222

23-
composer require "addwiki/mediawiki-api-base:~1.0"
23+
composer require "addwiki/mediawiki-api-base:~2.0"
2424

2525
## Example Usage
2626

27-
You can construct an api object by simply passing the api endpoint:
27+
You can get an api object by simply passing the api endpoint:
2828

2929
```php
30-
$api = new MediawikiApi( 'http://localhost/w/api.php' );
30+
$api = MediawikiApi::newFromApiEndpoint( 'http://localhost/w/api.php' );
3131
```
3232

33-
You can also pass a custom Guzzle ClientInterface:
33+
You can event just pass a page:
3434

3535
```php
36-
$client = new Client();
37-
$api = new MediawikiApi( 'http://localhost/w/api.php', $client );
36+
$api = MediawikiApi::newFromPage( 'https://en.wikipedia.org/wiki/Berlin' );
3837
```
3938

4039
You can easily log in and out:

RELEASENOTES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
These are the release notes for the [mediawiki-api-base](README.md).
22

3-
## Version 2.0.0
3+
## Version 2.0.0 (18 December 2015)
44
* Added `MediawikiApi::newFromApiEndpoint` and `MediawikiApi::newFromPage`
55
* MediawikiApi constructor access marked as private (please use static factory methods)
66
* Added async methods to MediawikiApi `getRequestAsync` & `postRequestAsync`
77
* Requires "guzzlehttp/guzzle": "~6.0" ( From "guzzle/guzzle": "~5.2" )
88
* Requires "guzzlehttp/promises": "~1.0"
99

10-
## Version 1.1.0 (5 september 2015)
10+
## Version 1.1.0 (5 September 2015)
1111
* Requests that encounter a connection exception are now retried
1212
* Requests that result in non blocking mediawiki api error codes are now retried (ratelimited, readonly, internal_api_error_DBQueryError)
1313
* MediawikiApi now implements PSR-3 LoggerAwareInterface

0 commit comments

Comments
 (0)