Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need a clean and well commented code for this, thankyou ! Given API endpoint: ``` https://api-origin.onefootball.com/score-one-proxy/api/teams/en/{team_id}.json ``` with the following characteristics: - The team

I need a clean and well commented code for this, thankyou !

Given API endpoint: ``` https://api-origin.onefootball.com/score-one-proxy/api/teams/en/{team_id}.json ```

with the following characteristics: - The team ID (`team_id`) is an **unsigned** integer. - The team IDs are sequential. - Some team IDs respond with errors.

Using the above API endpoint, find the following teams by name: * Germany * England * France * Spain * Manchester United * Arsenal * Chelsea * Barcelona * Real Madrid * Bayern Munich

Extract all the players from the given teams and render to **stdout** the information about players ordered by their **playerID**.

Each player entry should contain the following information:

``` playerID; full name; age; list of teams ```

The goal of the task is to print the players of the **given teams**. If there is a team overlap (e.g. a player plays in Germany and Chelsea), then print both teams.

**Output Example:** ``` 1. 6232; Bernd Leno; 29; Arsenal, Germany 2. 6683; Alexander Mustermann; 25; France, Manchester Utd 3. 8010; Marcelo; 33; Real Madrid 4. ... ```

**Delivery of the task:**

Push your code to the `main` branch of this repository. Feel free to makes any changes you want in this repo (including the README.md).

## FAQs

**Submission** * The solution should use the **latest** version of Go. * Feel free to use third-party libraries for the solution. * Code should be tested and well documentated. * Using concurrency in the solution is optional. * The API Endpoint URL and the list of teams should be easily configurable in the solution.

**API** * Discovering the valid team IDs is a part of the task. * All teams on the requested list can be found through the API endpoint. * The solution should not scan all the IDs on the API; only enough to get information about all the teams listed. * Some API calls might return errors, your code should handle that gracefully. * It's safe to assume that a player can be a part of maximum of 2 teams.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

1. How is the newspaper help to our daily life?

Answered: 1 week ago

Question

1. Prepare a short profile of Mikhail Zoshchenko ?

Answered: 1 week ago

Question

What is psychology disorder?

Answered: 1 week ago

Question

6. Explain how to train managers to coach employees.

Answered: 1 week ago