ariel17 / be-challenge-arios

Football league importer exercise in Golang, just for you <3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backend challenge by Ariel Gerardo Ríos (that's me!)

Start services with docker-compose

It is REQUIRED to change FOOTBALL_APIKEY environment variable value in docker-compose.yml file. Once started, it can take a few moments up be ready since it builds + tests + waits for database to be ready to accept connections.

docker-compose up

Example usage

# enqueues data import process for Premier League competition
curl -X POST --data '{"code":"PL"}' http://localhost:8080/importer

# Get players in Prime League that belongs to a Manches-like team (teamName optional)
curl -X GET "http://localhost:8080/competitions/pl/players?teamName=Manches"

# Get Manchester United team with players (showPlayers optional)
curl -X GET "http://localhost:8080/teams/MUN?showPlayers=true"

# Get Manchester United team persons (players and coaches if present)
curl -X GET "http://localhost:8080/teams/MUN/persons"

# Utility endpoints
curl -X GET "http://localhost:8080/status"

Swagger documentation

Served on http://localhost:8080/swagger/index.html

swagger screenshot

About

Football league importer exercise in Golang, just for you <3


Languages

Language:Go 99.4%Language:Dockerfile 0.6%