PHPackages                             m1so/champion - 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. m1so/champion

ActiveLibrary[API Development](/categories/api)

m1so/champion
=============

Champion.gg API wrapper written in PHP

v0.0.1(10y ago)129MITPHPPHP &gt;=5.5

Since Dec 30Pushed 10y ago1 watchersCompare

[ Source](https://github.com/m1so/champion)[ Packagist](https://packagist.org/packages/m1so/champion)[ RSS](/packages/m1so-champion/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Champion
========

[](#champion)

[Champion.gg API](http://api.champion.gg) wrapper written in PHP.

**Installation:**
Require this package using composer `composer require m1so/champion`

**Disclaimer:**The internal API of this package may change, use at own risk

**Todo:**

- Exception handling
- More examples and usecases
- Add tests

Documentation
=============

[](#documentation)

Overview of all methods and endpoints with examples.

Usage
-----

[](#usage)

Set you API key using

```
use Champion\ChampionAPI;
// ...
ChampionAPI::setKey($yourKeyHere);
```

Always remember to `use` or fully qualify the namespace

```
use Champion\Stats;
// ...
$stats = Stats::byRole('Top');
// or
$stats = \Champion\Stats::byRole('Top');
```

Champion specific
-----------------

[](#champion-specific)

List of all endpoints and methods that are specific to a given champion.

### All champions

[](#all-champions)

Endpoint: `/champion`
Example:

```
$champions = Champion::all();
```

### Champion info

[](#champion-info)

Endpoint: `/champion/:name`
Example:

```
// Grab all data for given champion
$ahriInfo = (new Champion('Ahri'))->info();
```

Endpoint: `/champion/:name/general`
Example:

```
// Grab only general data for given champion
$ahriGeneral = (new Champion('Ahri'))->general();
```

### Champion matchups

[](#champion-matchups)

Endpoint: `/champion/:name/matchup`Example:

```
// All matchups for champion
$matchups = (new Champion('TwistedFate'))->matchups();
```

### Finished items for champion

[](#finished-items-for-champion)

Endpoint: `/champion/:name/items/finished/{mostPopular, mostWins}`
Example:

```
// Grab all finished items (most popular is the default flag)
$popularItems = (new Champion($name))->items();
// Can be called explicitly
$popularItems = (new Champion($name))->items(Champion::CHAMPION_MOST_POPULAR);
// We can also get items by most wins this way
$mostWinsItems = (new Champion($name))->items(Champion::CHAMPION_MOST_WINS);
```

### Skill order for champion

[](#skill-order-for-champion)

Endpoint: `/champion/:name/skills/{mostPopular, mostWins}`
Example:

```
// Skill order (most popular is the default flag)
$popularItems = (new Champion($name))->skills();
// Can be called explicitly
$popularItems = (new Champion($name))->skills(Champion::CHAMPION_MOST_POPULAR);
// We can also get skills by most wins this way
$mostWinsItems = (new Champion($name))->skills(Champion::CHAMPION_MOST_WINS);
```

### Starting items

[](#starting-items)

Endpoint: `/champion/:name/items/starters/{mostPopular, mostWins}`Example:

```
// Same flags apply (Champion::CHAMPION_MOST_WINS and Champion::CHAMPION_MOST_POPULAR)
$startingItems = (new Champion($name))->startingItems();
```

### Summoner spells

[](#summoner-spells)

Endpoint: `/champion/:name/summoners/{mostPopular, mostWins}`
Example:

```
// Same flags apply (Champion::CHAMPION_MOST_WINS and Champion::CHAMPION_MOST_POPULAR)
$summs = (new Champion($name))->summonerSpells();
```

### Runes

[](#runes)

Endpoint: `/champion/:name/runes/{mostPopular, mostWins}`
Example:

```
// Same flags apply for runes (Champion::CHAMPION_MOST_WINS and Champion::CHAMPION_MOST_POPULAR)
$runes = (new Champion($name))->runes();
```

Matchup between two champions
-----------------------------

[](#matchup-between-two-champions)

Endpoint: `/champion/:name/matchup/:enemy`
Example:

```
// Matchup between two champions
$matchup = Matchup::info($as, $vs);
// TODO: Consider adding Matchup::between($as, $vs) syntax
```

Stats
-----

[](#stats)

Stats related endpoints and methods

### All stats

[](#all-stats)

Endpoint: `/stats`
Example:

```
// Grab all stats
$stats = Stats::all();
```

### All stats for all roles

[](#all-stats-for-all-roles)

Endpoint: `/stats/role`
Example:

```
$allRoles = Stats::allRoles();
```

### Choosing a specific role for stats

[](#choosing-a-specific-role-for-stats)

Endpoint: `/stats/role/:role/{mostImproved, leastImproved, leastWinning, mostWinning, worstPerformance, bestPerformance} [page, limit]`
Example:

```
// Set the role's name
$name = 'Top';
// Set page and limit (default from Champion.gg API)
$page = 1;
$limit = 10;

$stats = Stats::byRole($name);
// We can also specify the flag:
$statsMostImproved  = Stats::byRole($name, Stats::ROLE_MOST_IMPROVED, $page, $limit);
$statsLeastImproved = Stats::byRole($name, Stats::ROLE_LEAST_IMPROVED, $page, $limit);
$statsLeastWinning  = Stats::byRole($name, Stats::ROLE_LEAST_WINNING, $page, $limit);
$statsMostWinning   = Stats::byRole($name, Stats::ROLE_MOST_WINNING, $page, $limit);
$statsWorstPerf     = Stats::byRole($name, Stats::ROLE_WORST_PERFORMANCE, $page, $limit);
$statsBestPerf      = Stats::byRole($name, Stats::ROLE_BEST_PERFORMANCE, $page, $limit);
```

### Specific champion related stats

[](#specific-champion-related-stats)

Endpoint: `/stats/champs/:name`
Example:

```
$ahriStats = Stats::byChampion('Ahri');
```

### General champion stats

[](#general-champion-stats)

Endpoint: `/stats/champs/{mostBanned, leastWinning, leastPlayed, mostPlayed, mostWinning, bestRated, worstRated} [page, limit]`Example:

```
// Flag is required here:
// By bans
$champStats = Stats::champs(Stats::CHAMPION_MOST_BANNED, $page, $limit);
// By playrate
$champStats = Stats::champs(Stats::CHAMPION_MOST_PLAYED, $page, $limit);
$champStats = Stats::champs(Stats::CHAMPION_LEAST_PLAYED, $page, $limit);
// By winrate
$champStats = Stats::champs(Stats::CHAMPION_MOST_WINNING, $page, $limit);
$champStats = Stats::champs(Stats::CHAMPION_LEAST_WINNING, $page, $limit);
// By rating
$champStats = Stats::champs(Stats::CHAMPION_BEST_RATED, $page, $limit);
$champStats = Stats::champs(Stats::CHAMPION_WORST_RATED, $page, $limit);
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

3836d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/983741?v=4)[Michal Baumgartner](/maintainers/m1so)[@m1so](https://github.com/m1so)

---

Top Contributors

[![m1so](https://avatars.githubusercontent.com/u/983741?v=4)](https://github.com/m1so "m1so (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/m1so-champion/health.svg)

```
[![Health](https://phpackages.com/badges/m1so-champion/health.svg)](https://phpackages.com/packages/m1so-champion)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M948](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k36](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1933.1k4](/packages/aimeos-prisma)

PHPackages © 2026

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