Skip to content
/ PSFPL Public

A PowerShell module to connect to the FPL API

License

Notifications You must be signed in to change notification settings

sk82jack/PSFPL

Repository files navigation

PSFPL

Build Status Documentation Status

Description

A PowerShell Module to connect to and interact with the FPL API at https://fantasy.premierleague.com/

Authored by Jack Denton

Installing

The easiest way to get PSFPL is using the PowerShell Gallery!

Installing the module

You can install it using:

PS> Install-Module -Name PSFPL

Updating PSFPL

Once installed from the PowerShell Gallery, you can update it using:

PS> Update-Module -Name PSFPL

Uninstalling PSFPL

To uninstall PSFPL:

PS> Uninstall-Module -Name PSFPL

Examples

For a full list of available commands please check the documentation at https://psfpl.readthedocs.io/en/master/

Get-FplPlayer

This function will allow you to pull information on players. You can run the function as is to get information on all players in the game:

Get-FplPlayer

There are also parameters to allow you to filter your search based on name, club, position, price and dream team.

Get-FplFixture

This function will allow you to pull information on fixtures. You can run the function as is to get information on all fixtures:

Get-FplFixture

There are also parameters to allow you to filter your search based on gameweek and club.

Get-FplGameweek

This function will allow you to pull information on gameweeks. You can run the function as is to get information on all gameweeks:

Get-FplGameweek

There are also parameters to allow you to filter your search based on the gameweek number and the current gameweek.

Connect-Fpl

There are a few functions which require authentication in order to pull information about your own team. You can run this function to log in with your credentials:

Connect-Fpl

If you want to change the logged in account then you can run the function again with the Force parameter.

Get-FplLeague

This function will allow you to pull league information for a specific team. If you have authenticated with the API then it will show your own leagues:

Get-FplLeague

If you haven't authenticated already and don't specify a team ID with the TeamID parameter then it will ask for your credentials to log in and pull your leagues.

Get-FplLeagueTable

This function will allow you to pull your league tables. This can take a few minutes for large public leagues. The easiest way is to filter the results of Get-FplLeague and pipe it straight into this function:

Get-FplLeagueTable

There are LeagueID and Type parameters available to use if you don't want to pipe the league in from Get-FplLeague.

Get-FplTeam

This function will allow you to pull team information for a specific team. If you have authenticated with the API then it will show your own team:

Get-FplTeam

If you haven't authenticated already and don't specify a team ID with the TeamID parameter then it will ask for your credentials to log in and pull your leagues.

Get-FplTeamPlayer

This function will allow you to pull the lineup for a specific team in a specified gameweek. If you have authenticated with the API then it will show your own lineup from the current gameweek:

Get-FplTeamPlayer

If you haven't authenticated already and don't specify a team ID with the TeamID parameter then it will ask for your credentials to log in and pull your lineup.

Contributing to PSFPL

Interested in contributing? Read how you can Contribute to PSFPL

Release History

A detailed release history is contained in the Change Log.

License

PSFPL is provided under the MIT license.

About

A PowerShell module to connect to the FPL API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published