API that allow us manage live and history soccer matches.
Java version: 21
Framework: quarkus
Database: H2
It uses the next quarkus extensions:
- Hibernate ORM with Panache
- H2 (Inmemory DB)
- Hibernate Validator
- Reactive Jackson
- Reactive JSON-B
- Clone repository
- Run application into cloned repository:
- Windows
./gradlew.bat quarkusDev
- Linux
./gradlew quarkusDev
- Postman collection in src/main/resources/soccer api_collection.json
{
"local": "Barcelona",
"visitor": "Milan",
"stadium": "Camp nou",
"competition": "Champions",
"attendeesNumber": 25000,
"date": "2024-09-01"
}
Response
{
"attendeesNumber": 25000,
"competition": "Champions",
"date": "2024-09-01",
"local": "Barcelona",
"minute": 0,
"stadium": "Camp nou",
"state": "START",
"visitor": "Milan"
}
{
"local": "Barcelona",
"visitor": "Milan",
"date": "2024-09-01",
"localScore": 1,
"visitorScore": 0,
"minutes": 20,
"state": "IN_PROGRESS"
}
Response
{
"attendeesNumber": 25000,
"competition": "Champions",
"date": "2024-09-01",
"local": "Barcelona",
"minute": 20,
"stadium": "Camp nou",
"state": "IN_PROGRESS",
"visitor": "Milan"
}
Response
[
{
"attendeesNumber": 25000,
"competition": "Champions",
"date": "2024-09-01",
"local": "Barcelona",
"minute": 20,
"stadium": "Camp nou",
"state": "IN_PROGRESS",
"visitor": "Milan"
}
...
]
GET http://localhost:8080/match/state
params: state=IN_PROGRESS
Response
[
{
"attendeesNumber": 25000,
"competition": "Champions",
"date": "2024-09-01",
"local": "Barcelona",
"minute": 20,
"stadium": "Camp nou",
"state": "IN_PROGRESS",
"visitor": "Milan"
}
...
]
GET http://localhost:8080/match/team
params: team=Milan&page=1
Response
{
"page": 1,
"totalPages": 2,
"data": [
{
"attendeesNumber": 25000,
"competition": "Champions",
"date": "2024-09-01",
"id": 1,
"local": "Barcelona",
"localScore": 1,
"minutes": 20,
"stadium": "Camp nou",
"state": "IN_PROGRESS",
"visitor": "Milan",
"visitorScore": 0
}
...
]
}