Code Monkey home page Code Monkey logo

sports-naarad's Introduction

PyRag Sports API

A collection of command line tool and web API

Installing Command line tool for pyrag

You must have python3 installed on your local system. Download the zip file or clone the repository master branch

$ git clone https://github.com/PyRag/sports-naarad

Install the requirements

$ pip3 install -r requirements.txt

Run setup.py

$ python3 setup.py install

Usage

$ sports-naarad -h
Usage: sports-narad [-h] [-F] [-C] live_score|news|[player_stats name] [-my_fav_team]

Get latest updates for football and cricket

Options:

-h, --help                shows help(this) message

-F, --football [uefa,
barclay, fifa]            Get football updates. The tournament for which you
                          want to get updates. One of the argumets from uefa,
                          barclay and fifa is compulsory.

-C, --cricket             Get cricket updates for international matches.

[live-score, news,
,fixtures
player-stats[name]]       Fields to get. `live-scores` to get live socre of
                          on-going matches, `news` to get latest news headlines,
                          `player-stats` to get statistics of player specified.
                          `fixtures` to get updates on upcoming matches.
                          Compulsory single argument. For football option you
                          can give additional options topscorer.
                          Use `-` instead of space in names.

-proxy                    To specify proxy. Defaults to system proxy. Take name of
                          a file. Sample -proxy http://username:password@host:port/

$ sports-naarad -F barclay topscorer
╒══════════════════╤═══════════════╕
│ Player Name      │   Goal Scored │
╞══════════════════╪═══════════════╡
│ Harry Kane       │            22 │
├──────────────────┼───────────────┤
│ Jamie Vardy      │            19 │
├──────────────────┼───────────────┤
│ Romelu Lukaku    │            18 │
├──────────────────┼───────────────┤
│ Sergio Agüero    │            17 │
├──────────────────┼───────────────┤
│ Riyad Mahrez     │            16 │
├──────────────────┼───────────────┤
│ Odion Ighalo     │            14 │
├──────────────────┼───────────────┤
│ Olivier Giroud   │            12 │
├──────────────────┼───────────────┤
│ Jermain Defoe    │            12 │
├──────────────────┼───────────────┤
│ Diego Costa      │            11 │
├──────────────────┼───────────────┤
│ Gylfi Sigurdsson │            10 │
╘══════════════════╧═══════════════╛

WEB API USAGE

The sportsAPI is hosted at http://cherry-shortcake-81993.herokuapp.com

The API at present contains data for Football and Cricket.

More Sports will be added later so stay tuned :)

To access Cricket data :-

for cricket live scores : go to /cric/live/

for cricket news : go to /cric/news/

for cricket upcoming match list : go to /cric/matches/

for cricket player stats : go to /cric/player_stats/?player-name="PLAYER_NAME" # In the double quotes player name will be provided

To access Football data :-

for football live scores : go to /foot/live/

for football latest match results : go to /foot/results/

for football news : go to /foot/news/

for football pointstable : go to /foot/pointstable/

for football player stats : go to /foot/stats/?player-name=PLAYER_NAME # There will be no double quotes

sports-naarad's People

Contributors

khalibartan avatar

Watchers

James Cloos avatar  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.