Coder Social home page Coder Social logo

psfpl's Introduction

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.

psfpl's People

Contributors

sk82jack avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.