Coder Social home page Coder Social logo

rugby-data-api's Introduction

Rugby Data API

Build Status

This repository provides an API for accessing a variety of Rugby fixture and result data.

Development

To run the project locally, use the inbuilt web server:

php -S 0.0.0.0:4000 -t public/

To run tests:

./vendor/bin/phpunit

Models

Fixture

{
    home_team: {
        name: "Gloucester Rugby"
    },
    away_team: {
        name: "Leicester Tigers"
    },

    home_score: "31",
    away_score: "38",
    location: "Kingsholm",
    kickoff: "2016-09-02T18:45:00+00:00",

    links: [{
        rel: "home_team_fixtures",
        uri: "/fixtures/aviva/gloucester rugby"
    }, {
        rel: "away_team_fixtures",
        uri: "/fixtures/aviva/leicester tigers"
    }]
}

Table Row

{
    position: "1",
    team: "bath",
    played: "2",
    won: "2",
    drawn: "0",
    lost: "0",
    for: "76",
    against: "19",
    bonus_points: "1",
    points: "9"
}

Endpoints

League Table (/table/{league})

Available leagues:

  • aviva
  • pro12

Response

{
    data: [
        <Table Row />,
        <Table Row />,
        ...
    ]
}

League Fixtures (/fixtures/{league})

Available leagues:

  • aviva
  • pro12

Response

{
    data: [
        <Fixture />,
        <Fixture />,
        ...
    ]
}

Team Fixtures in a League (/fixtures/{league}/{team})

Available teams:

  • aviva
    • northampton Saints
    • exeter chiefs
    • saracens
    • bath rugby
    • leicester tigers
    • wasps
    • sale sharks
    • harlequins
    • gloucester rugby
    • newcastle falcons
    • bristol rugby
  • pro12
    • munster rugby
    • edinburgh rugby
    • ospreys
    • benetton treviso
    • scarlets
    • ulster rugby
    • connacht rugby
    • newport gwent dragons
    • glasgow warriors
    • leinster rugby
    • zebre
    • cardiff blues

Response

{
    data: [
        <Fixture />,
        <Fixture />,
        ...
    ]
}

rugby-data-api's People

Contributors

bobbyshaw avatar punkstar avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rugby-data-api's Issues

Extend the league

Hi,

First of all, thank you for your API, very great and useful !
But is it possible to have other coutnries and leagues like France, Top14 and ProD2, Super Rugby and the World Cup and European Cup ? :)

Thank you for your time !

Ensure fixtures are returned in date order.

As part of implementing the new BBC Sport source for the fixture data, I've noticed that fixtures aren't always returned in date order.

Adding a note here to remind myself to sort fixtures by kickoff before returning in the API.

Premiership Rugby Results no longer available

Premiership Rubgy fixtures and results are parsed from the calendar feed on this page. https://www.premiershiprugby.com/downloadable-fixture-list/. Unfortunately, the last fixture to have been updated with scores was on 4th March. Not sure if this is an error on their end or intentional. I've emailed on the off chance it wasn't an intentional change and they can fix it.

Otherwise, might need to look for alternative sources. https://www.premiershiprugby.com/fixtures/aviva-premiership-rugby-fixtures/ as a results page looks like it'd be a bit tricky to scrape.

This looks easier: http://www.bbc.co.uk/sport/rugby-union/english-premiership/results

Then in the DataManager, we may need to do a bit extra to import fixtures, tables and scores instead of just fixtures and table. Then the fixtures imported from the ical feed could be updated with the results from the bbc page. What do you think?

No Issues. Just a request

Hi

Ive been looking for a rugby league addon for Home Assistant and came across your git hub API.

Im pretty new to this and coding. Is there a way to get this to work for Rugby League as its will be similar if you collate your data from the BBC ?

Thanks in advance

Martyn

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.