PHPackages                             chypriote/pandascore-php - 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. chypriote/pandascore-php

AbandonedArchivedLibrary[API Development](/categories/api)

chypriote/pandascore-php
========================

PandaScore API wrapper for PHP7

v1.1.0(7y ago)24391[1 issues](https://github.com/chypriote/pandascore-php/issues)GPL-3.0-or-laterPHPPHP &gt;=7.2

Since Mar 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/chypriote/pandascore-php)[ Packagist](https://packagist.org/packages/chypriote/pandascore-php)[ Docs](https://github.com/chypriote/pandascore-php)[ RSS](/packages/chypriote-pandascore-php/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (7)Used By (0)

PandaScore PHP7 wrapper [![GitHub release](https://camo.githubusercontent.com/adebd81396bfe5f62ae13b303a7b8a5cab37edc96babeff24b559246bf539fdf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6368797072696f74652f70616e646173636f72652d7068702e737667)](https://github.com/chypriote/pandascore-php) [![Packagist](https://camo.githubusercontent.com/b05b8587cd182a6a87f330740da482849d67d0aed0931d0158e3f0faf6bc4c23/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6368797072696f74652f70616e646173636f72652d7068702e737667)](https://packagist.org/packages/chypriote/pandascore-php)
==============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#pandascore-php7-wrapper--)

> Version v1.0.0-rc.1

Table of Contents
=================

[](#table-of-contents)

1. [Introduction](#introduction)
2. [Downloading](#downloading)
3. [League of Legends API](#league-of-legends-api)
    1. [Resource versions](#resource-versions)
    2. [Initializing the library](#initializing-the-library)
    3. [Usage example](#usage-example)
    4. [Cache providers](#cache-providers)
    5. [Rate limiting](#rate-limiting)
    6. [Call caching](#call-caching)
    7. [Asynchronous requests](#asynchronous-requests)
    8. [Extensions](#extensions)
    9. [Callback functions](#callback-functions)
    10. [CLI support](#cli-support)

Introduction
============

[](#introduction)

Welcome to the PandaScore PHP7 library repo! The goal of this library is to create easy-to-use library for anyone who might need one. This is fully object oriented API wrapper for PandaScore' API.

Here are some handy features:

- **Rate limit caching** and limit exceeding prevention - fully automatic.
- **Call caching** - this enables the library to re-use already fetched data within short timespan - saving time and API rate limit.
- **Custom callbacks** - you can set custom function which will be called before or after the request is processed.
- **Object extensions** - you can implement own methods to the fetched API objects itself and enable yourself to use them later to ease of your work.
- **CLI supported**! You can use the library easily even in PHP CLI mode.
- **Objects everywhere**! API calls return data in special objects.

Downloading
===========

[](#downloading)

The easiest way to get this library is to use [Composer](https://getcomposer.org/).

While having Composer installed it takes only `composer require chypriote/pandascore-php` and `composer install` to get the library ready to roll!

PandaScore API
==============

[](#pandascore-api)

Resources
---------

[](#resources)

Below you can find table of implemented API resources. Endpoints without status are not planned to be implemented yet.

ResourceStatusAll Videogames - Leagues[![All Videogames - Leagues resource implemented version](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)All Videogames - Series[![All Videogames - Series resource implemented version](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)All Videogames - Tournaments[![All Videogames - Tournaments resource implemented version](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)All Videogames - Matches[![All Videogames - Matches resource implemented version](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)All Videogames - Teams[![All Videogames - Teams resource implemented version](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)All Videogames - Players[![All Videogames - Players resource implemented version](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)LOL - Champions[![LOL - Champions resource implemented version](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)LOL - Games[![LOL - Games resource implemented version](https://camo.githubusercontent.com/68397fa624fe13563928c5e35333578fd476de8dc38627fcbbca7c57860c67ac/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d6e6f2d637269746963616c2e737667)](https://camo.githubusercontent.com/68397fa624fe13563928c5e35333578fd476de8dc38627fcbbca7c57860c67ac/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d6e6f2d637269746963616c2e737667)LOL - Items[![LOL - Items resource implemented version](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)LOL - Leagues[![LOL - Leagues resource implemented version](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)LOL - Masteries[![LOL - Masteries resource implemented version](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)LOL - Matches[![LOL - Matches resource implemented version](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)LOL - Players[![LOL - Players resource implemented version](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)LOL - Runes[![LOL - Runes resource implemented version](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)LOL - Series[![LOL - Series resource implemented version](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)LOL - Spells[![LOL - Spells resource implemented version](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)LOL - Stats[![LOL - Stats resource implemented version](https://camo.githubusercontent.com/68397fa624fe13563928c5e35333578fd476de8dc38627fcbbca7c57860c67ac/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d6e6f2d637269746963616c2e737667)](https://camo.githubusercontent.com/68397fa624fe13563928c5e35333578fd476de8dc38627fcbbca7c57860c67ac/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d6e6f2d637269746963616c2e737667)LOL - Teams[![LOL - Teams resource implemented version](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)LOL - Tournaments[![LOL - Tournaments resource implemented version](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)](https://camo.githubusercontent.com/5d5c111e96126ba602aee9763edad811f73bb36924a882c9b06ae54878fe3b01/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d7965732d737563636573732e737667)CSGO[![CSGO resource implemented version](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)DOTA 2[![DOTA 2 resource implemented version](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)Overwatch[![Overwatch resource implemented version](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)](https://camo.githubusercontent.com/0986d8eed9bcf41f5244afa0fb2e639d58eaf1de1e147a2fba9985bb1bbd53f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465642d2d2d2d696e6163746976652e737667)Initializing the library
------------------------

[](#initializing-the-library)

How to begin?

```
//  Include all required files
require_once __DIR__  . "/vendor/autoload.php";

use PandaScoreAPI\PandaScoreAPI;

//  Initialize the library
$api = new PandaScoreAPI([
	//  Your API key, you can get one at https://pandascore.co/settings
	PandaScoreAPI::SET_TOKEN    => 'YOUR_PANDASCORE_TOKEN',
	// If you need to use a game specific API, you initialize it at launch
	PandascoreAPI::USE_LEAGUE_OF_LEGENDS => true,
]);

//  And now you are ready to rock!
$ch = $api->leagues->getLeague(61);
// Get only the datas from the games you need
$lolch = $api->lol->tournaments->listTournaments();
```

And there is a lot more what you can set when initializing the library - mainly to enable special features or to amend behaviour of the library.

Usage example
-------------

[](#usage-example)

Working with PandaScoreAPI can not be easier, just watch how to fetch a league information based on its id:

```
//  ...initialization...

//  this fetches the summoner data and returns SummonerDto object
$league = $api->getLeague(4213);

echo $league->id;             //  4213
echo $league->name;           //  LVP SLO
echo $league->slug;           //  league-of-legends-lvp-slo

print_r($league->getData());  //  Or array of all the data
/* Array
 * (
 *     [id] => 4213
 *     [slug] => league-of-legends-lvp-slo
 *     [name] => LVP SLO
 * )
 */
```

Cache providers
---------------

[](#cache-providers)

Cache providers are responsible for keeping data of [rate limiting](#rate-limiting) and [call caching](#call-caching) within instances of the library. This feature is automatically enabled, when any of previously mentioned features is used.

When using this feature, you can set `PandaScoreAPI::SET_CACHE_PROVIDER` to any class, thought it has to implement `Objects\ICacheProvider` interface. By using `PandaScoreAPI::SET_CACHE_PROVIDER_PARAMS` option, you can pass any variables to the cache provider.

Rate limiting
-------------

[](#rate-limiting)

This clever feature will easily prevent exceeding your per key call limits &amp; method limits. In order to enable this feature, you have to set `PandaScoreAPI::SET_CACHE_RATELIMIT` to `true`. Everything is completly automatic, so all you need to do is to enable this feature.

Call caching
------------

[](#call-caching)

This feature can prevent unnecessary calls to API within short timespan by temporarily saving fetched data from API and using them as the result data. In order to enable this feature, you have to set `PandaScoreAPI::SET_CACHE_CALLS` to `true`. You should also provide `PandaScoreAPI::SET_CACHE_CALLS_LENGTH` option or else default time interval of `60 seconds` will be used.

Asynchronous requests
---------------------

[](#asynchronous-requests)

This feature allows request grouping and their asynchronous sending using [Guzzle](https://github.com/guzzle/guzzle). After request is sent and its response received, user provided callbacks are invoked with received data.

Extensions
----------

[](#extensions)

Using extensions for ApiObjects is useful tool, allowing implementation of your own methods into the ApiObjects itself. Extensions are enabled by using settings option `PandaScoreAPI::SET_EXTENSIONS` when initializing the library.

Callback functions
------------------

[](#callback-functions)

Allows you to provide custom functions to be called before and after the actual API request is sent.

Before callbacks have ability to cancel upcomming request - when `false` is returned by *any callback* function, exception `Exceptions\RequestException` is raised and request is cancelled.

CLI support
-----------

[](#cli-support)

You can easily get API results even in CLI:

```
root@localhost:~/src/PandaScoreAPI# php PandaScoreAPICLI.php getLeague 61 --config ~/PandaScoreAPI_Config.json
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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 ~0 days

Total

6

Last Release

2607d ago

Major Versions

v0.2.0 → v1.0.02019-03-20

PHP version history (2 changes)v0.1.0PHP ^7.0.0

v0.2.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/e7394bdefd2b1c453a4877ee470f721097c39fb01f907ee3b9b3e9457a734841?d=identicon)[chypriote](/maintainers/chypriote)

---

Top Contributors

[![chypriote](https://avatars.githubusercontent.com/u/4965058?v=4)](https://github.com/chypriote "chypriote (14 commits)")

---

Tags

apiwrapperleague of legendsesportPHP7counter-strikeoverwatchdota2pandascore

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/chypriote-pandascore-php/health.svg)

```
[![Health](https://phpackages.com/badges/chypriote-pandascore-php/health.svg)](https://phpackages.com/packages/chypriote-pandascore-php)
```

###  Alternatives

[gabrielbull/ups-api

PHP UPS API

4642.4M10](/packages/gabrielbull-ups-api)[kronusme/dota2-api

DotA 2 Web API PHP wrapper

4782.7k](/packages/kronusme-dota2-api)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)[walle89/swedbank-json

Unofficial API client for the Swedbank's and Sparbanken's mobile apps in Sweden.

752.5k](/packages/walle89-swedbank-json)[jeffreyhyer/bamboohr

PHP SDK for the BambooHR API

1077.3k1](/packages/jeffreyhyer-bamboohr)[lasserafn/php-dinero

Dinero REST wrapper for PHP

115.2k](/packages/lasserafn-php-dinero)

PHPackages © 2026

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