Messtone LLC Manages(Amadeus):API Call

Messtone Devices Enables Amadeus API Call execute: curl “https://test.api.amadeus.com/v1/security/oauth2/token&#8221;\-H “Content-Type:application/x-www-form-urlencoded”\-d “grant_type=client_credentials&client_id={client_id}&client_secret={client_secret}” curl ‘https://test.api.amadeus.com/v1/shopping/flight-destination?origin=PAR&maxPrice=200&#8217;\-H ‘Authorization:Bearer ABCDEFGH12345’ Response {“data”:[{“type”:”flight-destination”,”origin”:”PAR”,”destination”:”CAS”,”departureDate”:”2022-09-06″,”returnDate”:”2022-09-11″,”price”:{“total”:”161.90″}},{“type”:”flight-destination”,”origin”:”PAR”,”destination”:”AYT”,”departureDate”:”2022-10-16″,”returnDate”:”2022-10-31″,”price”:{“total”:”181.50″}}]} Maven <dependency><groupId>com.amadeus</groupId><artifactId>amadeus-java</artifactId><version>9.0.0</version></dependency> Gradle compile “com.amadeus: amadeus-java:9.0.0” import com.amadeus.Amadeus;import com.amadeus.Params;import com.amadeus.exceptions.ResponseException;import com.amadeus.referenceData.Locations;import com.amadeus.resources.Locations;public class AmadeusExample{public static void main(String[ ] args) throw ReponseException{Amadeus amadeus=Amadeus .builder(“REPLACE_BY_ROBERTHARPER_MESSTONE_API_KEY”,”REPLACE_BY_ROBERTHARPER_MESSTONE_API_SECRET”).build( );Location[ ] locations=amadeue.referenceData.locations.get(Params .with(keyword”,”LON”).and(“subType”,Locations.ANY));System.out.println(locations);}}

Leave a comment