Giter VIP home page Giter VIP logo

spring-boot-amadeus-sdk-demo's Introduction

Spring Boot + Amadeus Java SDK Demo

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.

How to use it?

Register in Amadeus for Developers 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?

mvn spring-boot:run
mvn clean package
java -jar ./target/spring-boot-amadeus-sdk-demo-0.1.0-SNAPSHOT.jar
curl 'http://localhost:8080/api/v1/covid-restrictions?country-code=ES'

How to run as a Docker Container?

mvn spring-boot:build-image
docker build -t docker.io/library/spring-boot-amadeus-sdk-demo:0.1.0-SNAPSHOT .
docker run -p 8080:8080 \
    -e AMADEUS_CLIENT_ID=$AMADEUS_CLIENT_ID \
    -e AMADEUS_CLIENT_SECRET=$AMADEUS_CLIENT_SECRET \
    -t docker.io/library/spring-boot-amadeus-sdk-demo:0.1.0-SNAPSHOT

To test the container, you need to get the IP from the container:

docker-machine ip xxx

With that IP, you can execute curl without any issue:

curl 'http://IP_FROM_CONTAINER:8080/api/v1/covid-restrictions?country-code=ES'

Others commands

mvn prettier:write
mvn versions:display-dependency-updates

References

spring-boot-amadeus-sdk-demo's People

Contributors

jabrena avatar

Stargazers

 avatar

Watchers

 avatar  avatar

spring-boot-amadeus-sdk-demo's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.