This issue involves the backend side of the implementation to fulfill the required behavior.
Depends on #3 #8
Import League:
There should be an endpoint to import a league, named “import league”, that takes a “league code” as input.
The import league implementation must get data using the given league code, by making
requests to the http://www.football-data.org/ API, and import the data into a DB. Any SQL or
NoSQL DB can be used, as long as there are clear instructions on how to run the project
locally as well as an explanation for the decision in the README.
Information to retrieve:
Additionally, expose the following endpoints, that should rely exclusively on the data saved
inside the DB (it must not access the API football-data.org):
● players: takes league code as a parameter and returns the players that belong to all
teams participating in the given league. If the given league code is not present in the
DB, it should respond with an error message. Add an optional input to the endpoint to
filter players also by team name.
● team: takes a name and returns the corresponding team. Additionally, if requested in the
query, it should resolve the players for that team (or coaches, if players are not available
at the moment of implementation).
● players of a team: should resolve the players for the given team (or coaches, if players
are not available at the moment of implementation).
On the API access:
● Please notice that even though this is a paid API, you can get a free token and perform
your testing with some specific competitions (PD, CL, PL).
● It's important that the code handles in some way the limit frequency to the requests
performed with a free-token.