Skip to content

npldevfr/liquipedia-client

Repository files navigation


Liquipedia PHP Client

An unofficial PHP client for the Liquipedia API.

Latest Version on Packagist Tests Total Downloads

✨ Features

👌  Easy to use
🔥  Supports all Liquipedia API endpoints
🔨  Custom query builder
🧩  Extensible
📚  Well documented
🧪  Tested

📦 Installation

Supports PHP >= 8.2

composer require npldevfr/liquipedia-client

🚀 Usage

use Npldevfr\Liquipedia\ConditionsBuilder;
use Npldevfr\Liquipedia\Liquipedia;
use Npldevfr\Liquipedia\Meta\Endpoint;
use Npldevfr\Liquipedia\Meta\Wiki;

$liquipediaSdk = new Liquipedia('your-api-key');

// Get the last 10 matches of Team Liquid
$matches = $liquipediaSdk->query()
        ->endpoint(Endpoint::MATCHES)
        ->wikis(Wiki::LEAGUE_OF_LEGENDS)
        ->rawConditions('[[opponent::Team Liquid]]')
        ->limit(10)
        ->orderBy('date', 'desc')
        ->get()
    );

🛠️ Development

git clone https://github.com/npldevfr/liquipedia-client
composer install

composer test