Giter Site home page Giter Site logo

soccer-standings-api's Introduction

Soccer-Standings-API

About

A RESTful API for top European soccer league standings with full CRUD functionality. Seeded from this API.

Usage

Deployed website here: https://soccer-standings-api-production.up.railway.app/

Endpoints: Right now you can search for a specific league by ID, but not specific teams inside the standings array. So you need to copy and paste the standings, then make edits.

router.use("/leagues", leaguesRoutes)
router.get("/", controllers.getLeagues);
router.get("/:id", controllers.getLeague);
router.post("/", controllers.createLeague);
router.put("/:id", controllers.updateLeague);
router.delete("/:id", controllers.deleteLeague);

So for example, a GET request at https://localhost:3000/leagues would display all leagues. The model for a league and team is below:

let Team = new mongoose.Schema ({
    Position: Number,
    Name: String,
    Points: Number,
    Played: Number,
    Winned: Number,
    Loosed: Number,
    Tie: Number,
    "Goal Difference": Number,
    SquadLogo: String
})

let League = new mongoose.Schema({
    leagueName: String,
    country: String,
    standings: [Team]
})

Future Improvements

Add search by league name. Add search by team ID or name. Add more leagues.

soccer-standings-api's People

Contributors

mateolopcas avatar

Watchers

 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.