npldevfr/liquipedia-client

A PHP client for the Liquipedia v3 API

1.2.0 2024-01-30 14:34 UTC

This package is auto-updated.

Last update: 2025-03-29 01:08:12 UTC


README


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