PHPackages                             schoppax/php-sleeper-api - 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. schoppax/php-sleeper-api

ActiveLibrary[API Development](/categories/api)

schoppax/php-sleeper-api
========================

Sleeper API PHP library for consuming fantasy content

v1.2.0(4y ago)14MITPHPPHP &gt;=7.3

Since Sep 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/SchoppAx/php-sleeper-api)[ Packagist](https://packagist.org/packages/schoppax/php-sleeper-api)[ RSS](/packages/schoppax-php-sleeper-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

php-sleeper-api
===============

[](#php-sleeper-api)

[![Build Status](https://github.com/schoppax/php-sleeper-api/actions/workflows/php.yml/badge.svg)](https://github.com/schoppax/php-sleeper-api)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a207e26403fd263dd2508e23dab11e8868b69826009a278d6670dcbfa6b8c4e8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5363686f707041782f7068702d736c65657065722d6170692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/SchoppAx/php-sleeper-api/?branch=master)[![Coverage Status](https://camo.githubusercontent.com/4a04f8eb8db0d5e44ae38b86b46df5551fd21ff45b632280d2a5285633fbf9e0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f5363686f707041782f7068702d736c65657065722d6170692f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/SchoppAx/php-sleeper-api?branch=master)

[![PHP from Packagist](https://camo.githubusercontent.com/6b8c413bdbbbcec72f0d69e14874d70f0fa0a21b6ab2073090b24792d1775464/68747470733a2f2f706f7365722e707567782e6f72672f7363686f707061782f7068702d736c65657065722d6170692f726571756972652f706870)](https://packagist.org/packages/schoppax/php-sleeper-api)[![Latest Stable Version](https://camo.githubusercontent.com/cb92499d0e2755c861775465805b2c387e6ba01fb3f8ae7452845d5b37bb4b5f/68747470733a2f2f706f7365722e707567782e6f72672f7363686f707061782f7068702d736c65657065722d6170692f762f737461626c65)](https://packagist.org/packages/schoppax/php-sleeper-api)[![Total Downloads](https://camo.githubusercontent.com/9083a40a6d7c1cfca83a83323b5663e6352fbf58367002b376fc6e461bf455d5/68747470733a2f2f706f7365722e707567782e6f72672f7363686f707061782f7068702d736c65657065722d6170692f646f776e6c6f616473)](https://packagist.org/packages/schoppax/php-sleeper-api)[![License](https://camo.githubusercontent.com/9f60d44db643fdc99e55f98925bc6f1e0e2b8314707176d90787ac8dc4173e23/68747470733a2f2f706f7365722e707567782e6f72672f7363686f707061782f7068702d736c65657065722d6170692f6c6963656e73652e706e67)](https://packagist.org/packages/schoppax/php-sleeper-api)

Sleeper API PHP library for consuming fantasy content from [official read-only Sleeper HTTP API](https://docs.sleeper.app/)

Installation
============

[](#installation)

If you're using Composer to manage dependencies, you can run the following command:

```
$ composer require schoppax/php-sleeper-api
```

or add the following to your composer.json file:

```
"require": {
  "schoppax/php-sleeper-api": "1.*",
}
```

Usage
=====

[](#usage)

```
use SchoppAx\Sleeper\SleeperClient;

$client = new SleeperClient();
```

Examples
--------

[](#examples)

### League

[](#league)

Get a specific league by id:

```
try {
  $league = $client->leagues()->find('289646328504385536');
  echo $league['league_id'];
  echo $league['name'];
  echo $league['season'];
  echo $league['roster_positions'];
} catch(BadMethodCallException $be) {

} catch(Exception $e) {

}
```

### User

[](#user)

Get the user object by either providing the username or user\_id:

```
try {
  $user = $client->users()->find('2ksports');
  echo $user['user_id'];
  echo $user['username'];
  echo $user['display_name'];
  echo $user['avatar'];
} catch(BadMethodCallException $be) {

} catch(Exception $e) {

}
```

Implementation status
---------------------

[](#implementation-status)

Sleeper ClassStatusAvatars100%Drafts100%Leagues100%Players100%Users100%

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

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

Every ~21 days

Total

4

Last Release

1632d ago

Major Versions

v0.0.1 → v1.0.02021-09-27

PHP version history (2 changes)v0.0.1PHP ^7.4|^8.0

v1.0.0PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/7bff70647d12a45a70b5786219104c68026664fd8211d8b15163276c97f93cb7?d=identicon)[SchoppAx](/maintainers/SchoppAx)

---

Top Contributors

[![SchoppAx](https://avatars.githubusercontent.com/u/18134256?v=4)](https://github.com/SchoppAx "SchoppAx (80 commits)")

---

Tags

composerfantasyphpphp-librarysleepersleeper-api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/schoppax-php-sleeper-api/health.svg)

```
[![Health](https://phpackages.com/badges/schoppax-php-sleeper-api/health.svg)](https://phpackages.com/packages/schoppax-php-sleeper-api)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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