Comments (1)
Amadeus for Developers Self-Service APIs and the SDKs target to the followings URLs:
test.api.amadeus.com
for test usersapi.amadeus.com
for production users
The endpoint you provide https://travel.api.amadeus.com/v1/reference-data/airlines
doesn't look like a Self-Service one.
Here is a full example for the API you try to call.
import com.amadeus.Amadeus;
import com.amadeus.Params;
import com.amadeus.exceptions.ResponseException;
import com.amadeus.resources.Airline;
public class Search {
public static void main(String[] args) throws ResponseException {
Amadeus amadeus = Amadeus
.builder("YOUR_API_KEY","YOUR_API_SECRET")
.build();
Airline[] airlines = amadeus.referenceData.airlines.get(Params
.with("airlineCodes", "BA"));
if (airlines[0].getResponse().getStatusCode() != 200) {
System.out.println("Wrong status code: " + airlines[0].getResponse().getStatusCode());
System.exit(-1);
}
System.out.println(airlines[0]);
}
}
from amadeus-java.
Related Issues (20)
- Upgrade compilation level to Java 8
- hotel price search convenience endpoint HOT 3
- shopping hotel-offers : issue sending array of hotel id's HOT 4
- PolicyDetails doesn't match json spec
- Inconsistency in API - FlightOrders vs HotelBookings
- Update params to accept String array as input HOT 2
- Flight Order - Traveler Device Type
- support Flight Offer Search V2.8 : new criteria "non-stop prefered" HOT 1
- Update the NullPointerException
- Fix AmadeusTest.java tests
- Remove unused params
- Unnecessary use of fully qualified name with an import
- Fix empty exception handler
- Split unit tests in smaller methods
- Update to camelcase method names
- Add assert() on missing tests
- NPE from Amadeus.referenceData.locations.cities
- test api returning data that mismatch some resource models
- New Transfer APIs to be added
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amadeus-java.