|
Developer's Guidelines |
This page contains information that we believe is pertinent to successfully developing an application using the Amadeus API. It will be updated in a timely manner and will include recommendations on the usage of different functions. |
Table of Contents |
A UML Example Of a Travel Booking Engine using the Amadeus API |
This presentation describes an example UML (Unified Modeling Language) design for a multi-user, multi-threaded Travel Booking Engine using the Amadeus APIv2. The design purposely concentrates on the interaction between the Application Provider’s software and the conversation management aspect of APIv2 Proxy library. |
![]() |
![]() |
|
Eumerated types |
It is strongly recommended to use the enumerated types provided instead of
hard coded numerical values in your code. December 2002 |
![]() |
|
Error management |
There are essentially two types of function calls provided by the API Proxy.
Technical function calls, such as those dealing with conversation
management, memory management and diagnostics, and application function
calls providing access to the range of Amadeus Central System travel products.
|
![]() |
Understanding CContainer flavor MetaStructures | |||
In the CContainer flavor of the API, query messages are constructed from an arrangement of C Containers containing C structures. The C Container definitions, and the structures they will contain are described in the header files interfaceName dic.h. For example, the file PoweredAirdic.h contains all C Container and C structures necessary to build all possible query messages in the PoweredAir Interface (such as MultiAvailability, Availability or RetrieveSeatMap) as well as to read the data from all possible reply messages in this interface (such as MultiAvailabilityReply, AvailabilityReply and the RetrieveSeatMapReply). You may notice that certain C structures which represent the same thing, but which belong to different messages, are merged. This merged structure is know as a metastructure. The advantage of the metastructure is to optimise memory usage. The disadvantage is thatthe size and repetition values may sometimes seem confusing in certain contexts. For example, In the PoweredAirDic.h file, the field typeOfRequest in the C structure CAPI_PoweredAirProductTypeDetails is described as :
C structure from .h file This field is used both by the query message (PoweredAir_MultiAvailability) as well as the query message (PoweredAir_Availability). In the PoweredAir_MultiAvailability query message, the online documentation shows how the structure needs to be completed in order to build a CAPI_PoweredAirMultiAvailabilityRequestSection-> CAPI_PoweredAirAvailabilityOptions-CAPI_PoweredAirProductTypeDetails->typeOfRequest CAPI_PoweredAirProductTypeDetails productTypeDetails;
On-line documentation Notice that here this field type of request is not repeated, and its maximum length is 2+1. In this context, the C structure provided in the PoweredAirDic.h file seems excessively large. This is because, the same structure is reused in the query message of PoweredAir_Availability, CAPI_PoweredAirAvailability_cityPairRelatedSection-> CAPI_PoweredAirAvailability_requestSection->CAPI_PoweredAirTravelProductInformation-> CAPI_PoweredAirProductTypeDetails->typeOfRequest) where the online documentation describes it as: CAPI_PoweredAirProductTypeDetails availabilityTypeDetails;
To summarize: The online documentation describes the usage in a given context, where as the <interfaceName>dic.h file describes the metastructures. September 2003 |
|||
![]() |