Git Product home page Git Product logo

fifa-world-cup-emulator-backend's Introduction

FIFA World Cup Emulator Back-End API

This project was bootstrapped with Node.js

Available Scripts

To start with this project, you should first run following command in the project directory to install all necessary dependencies:

npm install

After the installation, in the project directory, you can run:

npm start

Runs the server.

Documetation

Overview

Routes

GET /teams

  • Return an array of teams objects

  • Response body example:

[
  {
    "teamID": "51",
    "teamName": "Qatar",
    "country_flag": "https://yans-capstone-backend.herokuapp.com//country_flags/Flag_of_Qatar.svg",
    "qualified": "true",
    "group": "A",
    "position": "1",
    "coach": "Felix Sanchez",
    "record": "TBD",
    "formation": "4-3-3"
  }
]

GET /players

  • Return an array of players objects

  • Response body example:

[
  {
    "id": "4c5f6961-c694-488f-9d61-2fce9c549b6a",
    "No": "1",
    "Pos": "GK",
    "Player": "Saad Al Sheeb",
    "Date-of-Birth": "19 February 1990 (age 32)",
    "Caps": "76",
    "Goals": "0",
    "Club": "Qatar Al-Sadd",
    "Country": "Qatar",
    "Captain": "0"
  },
]

GET /players?team={teamName}

  • Return an array of players objects that belong to the given national team
  • {teamName} must be swapped out with the actual team name as found in the list of teams

PUT /teams/:teamID

  • Change the formation of the given team
  • :teamID must be swapped out with numeric id of a team as found in the list of teams
  • Put body example
{
  "formation": "3-6-1"
}
  • Response body example
[
  {
    "teamID": "51",
    "teamName": "Qatar",
    "country_flag": "https://yans-capstone-backend.herokuapp.com//country_flags/Flag_of_Qatar.svg",
    "qualified": "true",
    "group": "A",
    "position": "1",
    "coach": "Felix Sanchez",
    "record": "TBD",
    "formation": "3-6-1"
  }
]

fifa-world-cup-emulator-backend's People

Contributors

joey2005 avatar

Watchers

 avatar Jim 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.