Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jabrena/quarkus-amadeus-sdk-demo
https://github.com/jabrena/quarkus-amadeus-sdk-demo
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jabrena/quarkus-amadeus-sdk-demo
- Owner: jabrena
- License: apache-2.0
- Created: 2022-04-27T13:13:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-31T16:24:14.000Z (over 2 years ago)
- Last Synced: 2024-10-11T03:14:48.153Z (about 1 month ago)
- Language: HTML
- Size: 242 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Quarkus + Amadeus Java SDK Demo
[![Java CI](https://github.com/jabrena/quarkus-amadeus-sdk-demo/actions/workflows/build.yml/badge.svg)](https://github.com/jabrena/quarkus-amadeus-sdk-demo/actions/workflows/build.yml)
## Motivation
Sometimes, I need to travel in Europe or cross the Atlantic ocean but
after 2 years of COVID, before travelling I need to review the country restrictions
defined for travellers.## Value
This example show how to see COVID restrictions in a particular [country](https://www.iso.org/iso-3166-country-codes.html).
## How to use it?
Register in [Amadeus for Developers](https://developers.amadeus.com) to get your `AMADEUS_CLIENT_ID` & `AMADEUS_CLIENT_SECRET`
Export the values:
```
export AMADEUS_CLIENT_ID=YOUR_CLIENT_ID
export AMADEUS_CLIENT_SECRET=YOUR_CLIENT_SECRET
```## How to run in local?
```
./mvnw clean compile quarkus:dev
./mvnw clean package
java -jar target/quarkus-app/quarkus-run.jar
./mvnw package -Dnative
./mvnw verify -Pnative
#./mvnw package -Dnative -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel:22.1.0.0-Final-java17
./target/getting-started-1.0.0-SNAPSHOT-runnerdocker build -f src/main/docker/Dockerfile.jvm -t 1a4dev/covid:latest .
docker run -i --rm -p 8080:8080 \
-e AMADEUS_CLIENT_ID=$AMADEUS_CLIENT_ID \
-e AMADEUS_CLIENT_SECRET=$AMADEUS_CLIENT_SECRET \
-t 1a4dev/covid:latest
``````
curl 'http://localhost:8080/api/v1/covid-restrictions'
curl 'http://localhost:8080/api/v1/covid-restrictions?country-code=FR'
```**Others:**
```
curl 'http://localhost:8080/api/v1/config-demo'
```# References
- https://quarkus.io/guides/getting-started