Skip to content

tarun7r/Premier-League-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Premier League API

This is an unofficial Premier League API client for pulling player stats, fixtures, tables, and results data from the Premier League. The API is built using Flask, and the data is scraped from the Premier League website.

API Endpoints

The application provides the following API endpoints:

GET /players/{player_name}

This endpoint retrieves information about a Premier League player with the given name. The player name should be provided as a URL parameter.

The API returns a JSON object with the following structure:

[
        {
          'name': name, 
          'position': position, 
          'club': club, 
          'key_stats': basic_stats, 
          'Nationality': nationality, 
          'Date of Birth': dob,
          'height':height,
          'complete stats': all_stats
          }
]

GET /table

The JSON object contains an array of strings, where each string represents a team's position, name, number of games played, wins, draws, losses, goal difference, and total points.

The API returns a JSON object with the following structure:

[ { Played Won Draw Lost Goal Differnece Total Points } ] 

GET /fixtures/{team_name}

This endpoint retrieves information about the next Three Premier League fixtures of the team. The team name should be provided as a URL parameter.

The API returns a JSON object with the following structure:

[ { "Team A vs Team B DD/MM/YYYY HH:MM", "Team A vs Team C DD/MM/YYYY HH:MM", "Team A vs Team D DD/MM/YYYY HH:MM"} ] 

Setup Details

Follow the following instructions to run the application and start using the api in your local pc
  • Clone the repository
  • Open the terminal, navigate to the folder where your clone of this repository is located and type:

    $ pip install -r requirements.txt

  • Type $ python main.py in the terminal and the script will run for as long as you let it.
  • Individual PLayer PL Stats

    • Example: Stats of Cristiano Ronaldo | One can use the common name of the Players as well to retrive the data


    Premier League Table

    • Current Premier League Table


    Premier League Fixtures

    • Fixtures of the Next three weeks


    Update

    You can search the player stats by using the players reference image (Face Recognition using ML) as well - Repo

    About

    An unofficial api client for pulling player Stats, Fixtures, Tables and Results data from the Premier League

    Topics

    Resources

    Stars

    Watchers

    Forks

    Languages