Skip to content

PHP library for interacting with the read-only Sleeper fantasy football API

Notifications You must be signed in to change notification settings

danabrey/sleeper-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sleeper API

PHP library for interacting with the read-only Sleeper fantasy football API.

PHP Composer

Installation

composer require danabrey/sleeper-api

Usage

Create an instance of the client

$client = new DanAbrey\SleeperApi\SleeperApiClient();

No API key is required for the Sleeper API, as it is read-only and they do not track requests in this way.

$client->league('xxxxx') where xxxxx is the league ID, for basic league info $client->rosters('xxxxx') where xxxxx is the league ID, for all rosters $client->users('xxxxx') where xxxxx is the league ID, for all users in a league

All methods return either a single instance or an array of plain PHP objects that represent the data returned. e.g. SleeperRoster

Note

It is your responsibility to abide by the terms of the Sleeper API.

Running tests

./vendor/bin/phpunit

About

PHP library for interacting with the read-only Sleeper fantasy football API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages