PHPackages                             it-shura/mediawiki-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. it-shura/mediawiki-sdk

Abandoned → [quranacademy/mediawiki-sdk](/?search=quranacademy%2Fmediawiki-sdk)Library[API Development](/categories/api)

it-shura/mediawiki-sdk
======================

SDK for MediaWiki API

2.1(8y ago)21.1kMITPHPPHP &gt;=5.6

Since Aug 9Pushed 8y ago4 watchersCompare

[ Source](https://github.com/IT-Shura/MediaWiki-SDK)[ Packagist](https://packagist.org/packages/it-shura/mediawiki-sdk)[ Docs](https://github.com/IT-Shura/MediaWiki-SDK)[ RSS](/packages/it-shura-mediawiki-sdk/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (4)Versions (18)Used By (0)

MediaWiki SDK
=============

[](#mediawiki-sdk)

[![Build Status](https://camo.githubusercontent.com/c33e98ed13f8f33b3b4b5bd5b61159918a2b9d13ee59c41b213cf0aca90b9f14/68747470733a2f2f7472617669732d63692e6f72672f49542d53687572612f4d6564696157696b692d53444b2e737667)](https://travis-ci.org/IT-Shura/MediaWiki-SDK)[![Total Downloads](https://camo.githubusercontent.com/c7434a2eef6d5024482700e6c52b266d01bcd7c07f15b40d4c8d9a038aa32dd3/68747470733a2f2f706f7365722e707567782e6f72672f69742d73687572612f6d6564696177696b692d73646b2f646f776e6c6f616473)](https://packagist.org/packages/it-shura/mediawiki-sdk)[![Latest Stable Version](https://camo.githubusercontent.com/6c6b75aa4b8315fb81edb0d890ac409b449631d2414b26428582d58e11c6aad1/68747470733a2f2f706f7365722e707567782e6f72672f69742d73687572612f6d6564696177696b692d73646b2f762f737461626c65)](https://packagist.org/packages/it-shura/mediawiki-sdk)[![License](https://camo.githubusercontent.com/e19643572f7bc421deb2e89f2b69ad6307dbec5e0026c5838888757edc443d43/68747470733a2f2f706f7365722e707567782e6f72672f69742d73687572612f6d6564696177696b692d73646b2f6c6963656e7365)](https://packagist.org/packages/it-shura/mediawiki-sdk)

MediaWiki SDK - библиотека для работы с API MediaWiki.

Минимальная версия MediaWiki: 1.27+.

Содержание
----------

[](#содержание)

- [Установка](#%D0%A3%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0)
- [Быстрый старт](#%D0%91%D1%8B%D1%81%D1%82%D1%80%D1%8B%D0%B9-%D1%81%D1%82%D0%B0%D1%80%D1%82)
- [Авторизация](#%D0%90%D0%B2%D1%82%D0%BE%D1%80%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F)
- [Выполнение запроса](#%D0%92%D1%8B%D0%BF%D0%BE%D0%BB%D0%BD%D0%B5%D0%BD%D0%B8%D0%B5-%D0%B7%D0%B0%D0%BF%D1%80%D0%BE%D1%81%D0%B0)

Установка
---------

[](#установка)

Для установки MediaWiki SDK выполните команду:

```
composer require it-shura/mediawiki-sdk

```

Быстрый старт
-------------

[](#быстрый-старт)

```
use MediaWiki\Api\Api;
use MediaWiki\Api\Exceptions\ApiException;
use MediaWiki\Storage\FileStore;
use MediaWiki\HttpClient\CurlHttpClient;

$url = 'http://ru.example.com/api.php';

$httpClient = new CurlHttpClient();
$storage = new FileStore(__DIR__.'/storage/cache');

$api = new Api($url, $httpClient, $storage);
```

Авторизация
-----------

[](#авторизация)

```
$username = 'John@FooBot';
$password = 'pri9l1fl1j315hmp3okbnqspqcgaue1t';

try {
    $api->login($username, $password);
} catch (ApiException $exception) {
    echo sprintf('MediaWiki API Error: ', $exception->getMessage());

    exit;
}

// bool(true)
var_dump($api->isLoggedIn());

// выход
$api->logout();
```

Выполнение запроса
------------------

[](#выполнение-запроса)

```
$parameters = [
    'action' => 'query',
    'list' => 'allpages',
];

$response = $api->request('POST', $parameters);

// или

$parameters = [
    'list' => 'allpages',
];

$response = $api->query($parameters);

var_dump($response);
```

### Параметры метода `request`

[](#параметры-метода-request)

- **method** - HTTP-метод (POST/GET)
- **parameters** - параметры запроса (опционально)
- **headers** - заголовки запроса (опционально)
- **decode** - декодирует запрос, если передан параметр `true` (только json, опционально)

### Параметры метода `query`

[](#параметры-метода-query)

- **parameters** - параметры запроса
- **decode** - декодирует запрос, если передан параметр `true` (только json, опционально)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~24 days

Recently: every ~31 days

Total

18

Last Release

3206d ago

Major Versions

1.3.1 → 2.02017-07-24

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11244193?v=4)[Muhammad Imangazaliev](/maintainers/Imangazaliev)[@Imangazaliev](https://github.com/Imangazaliev)

---

Top Contributors

[![Imangazaliev](https://avatars.githubusercontent.com/u/11244193?v=4)](https://github.com/Imangazaliev "Imangazaliev (38 commits)")

---

Tags

mediawikimediawiki-apiwikipediawikipedia-apimediawiki

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/it-shura-mediawiki-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/it-shura-mediawiki-sdk/health.svg)](https://phpackages.com/packages/it-shura-mediawiki-sdk)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
