2017 © Pedro Peláez
 

library fpl-lib

PHP Library to access the undocumented https://fantasy.premierleague.com API

image

mormanski/fpl-lib

PHP Library to access the undocumented https://fantasy.premierleague.com API

  • Tuesday, December 5, 2017
  • by mormanski
  • Repository
  • 1 Watchers
  • 1 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 17 % Grown

The README.md

FplLib, PHP library for the Fantasy Premier League API

PHP Library to access the undocumented https://fantasy.premierleague.com API, (*1)

Installation

Using composer

composer require mormanski/fpl-lib

Using github repository

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/mormanski/fpl-lib"
        }
    ],
    "require": {
        "mormasnki/fpl-lib": "master"
    }
}

Using the library

use Mormanski\FplLib\FplLib;

$fpl = new FplLib();
$client = $fpl->getClient();

API Endpoints

https://fantasy.premierleague.com/api/bootstrap-static, (*2)

$bootstrapStatic = $client->bootstrapStatic();

https://fantasy.premierleague.com/api/leagues-classic-standings/{leagueId}, (*3)

$leaguesClassicStandings = $client->leaguesClassicStandings(['leagueId' => '123123']);

https://fantasy.premierleague.com/api/entry/{entryId}, (*4)

$entry = $client->entry(['entryId' => '1234567']);

https://fantasy.premierleague.com/api/entry/{entryId}/history, (*5)

$entryHistory = $client->entryHistory(['entryId' => '1234567']);

https://fantasy.premierleague.com/api/entry/{id}/event/{eventId}/picks, (*6)

$data = $client->entryPicks(['entryId' => $entryId, 'eventId' => $eventId]);

https://fantasy.premierleague.com/api/element-summary/{elementId}, (*7)

$elementSummary = $client->elementSummary(['elementId' => '123']);

Terminology

  • An entry is equivalent to a contestant in the competition
  • An element is equivalent to a player
  • An event is equivalent to a game week, for instance eventId => 2 denotes game week 2.

The Versions

05/12 2017

dev-master

9999999-dev https://github.com/mormanski/fpl-lib

PHP Library to access the undocumented https://fantasy.premierleague.com API

  Sources   Download

GPL-3.0

The Requires

 

api php library epl fantasy football premier league

05/12 2017

0.1.2

0.1.2.0 https://github.com/mormanski/fpl-lib

PHP Library to access the undocumented https://fantasy.premierleague.com API

  Sources   Download

GPL-3.0

The Requires

 

api php library epl fantasy football premier league

05/12 2017

dev-dev

dev-dev https://github.com/mormanski/fpl-lib

PHP Library to access the undocumented https://fantasy.premierleague.com API

  Sources   Download

GPL-3.0

The Requires

 

api php library epl fantasy football premier league

13/10 2017

0.1.1

0.1.1.0 https://github.com/mormanski.net/fpl-lib

PHP Library to access the undocumented https://fantasy.premierleague.com API

  Sources   Download

GPL-3.0

The Requires

 

api php library epl fantasy football premier league

13/10 2017

v0.1

0.1.0.0 https://github.com/mormanski.net/fpl-lib

PHP Library to access the undocumented https://fantasy.premierleague.com API

  Sources   Download

GPL-3.0

The Requires

 

api php library epl fantasy football premier league