Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and [Keep a Changelog](http://keepachangelog.com/).

- Added internal mechanism to handle version-dependent parameters of API modules ([#151])
- Support version-dependent `deletetalk` parameter in `WikiPage::delete()` and `WikiFile::delete()` ([#152])
- New method `Wikimate::undelete()` ([#153])
- New method `Wikimate::undelete()` ([#153], [#155])

### Changed

Expand Down Expand Up @@ -251,3 +251,5 @@ and may require changes in applications that invoke these methods:_
[#150]: https://github.com/hamstar/Wikimate/pull/150
[#151]: https://github.com/hamstar/Wikimate/pull/151
[#152]: https://github.com/hamstar/Wikimate/pull/152
[#153]: https://github.com/hamstar/Wikimate/pull/153
[#155]: https://github.com/hamstar/Wikimate/pull/155
13 changes: 12 additions & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [Deleting...](#deleting-1)
- [Other stuff](#other-stuff)
- [Running custom queries](#running-custom-queries)
- [Restoring a deleted page or file](#restoring-a-deleted-page-or-file)
- [Customizing the user agent](#customizing-the-user-agent)
- [Maximum lag and retries](#maximum-lag-and-retries)
- [Handling errors and exceptions](#handling-errors-and-exceptions)
Expand Down Expand Up @@ -347,6 +348,16 @@ $array_result = $wiki->edit($data);

Both methods return an array of the MediaWiki API result.

### Restoring a deleted page or file

A previously deleted page or file can be undeleted via its original path,
including namespace if applicable:

```php
$wiki->undelete('Sausages');
$wiki->undelete('File:Old-button.png');
```

### Customizing the user agent

API requests are made over HTTP with a user agent string to identify
Expand All @@ -358,8 +369,8 @@ The string can be retrieved and customized via:

```php
$useragent = $wiki->getUserAgent();
$wiki->setUserAgent('Custom User Agent');
$wiki->setUserAgent('Custom Prefix - ' . $useragent);
$wiki->setUserAgent('Custom User Agent');
```

In order to use a custom user agent for all requests in the session,
Expand Down