Git Product home page Git Product logo

premier-league-api's Introduction

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

    premier-league-api's People

    Contributors

    tarun7r avatar

    Stargazers

     avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

    Watchers

     avatar  avatar  avatar  avatar  avatar  avatar

    premier-league-api's Issues

    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.