Search code examples
curlamadeus

Amadeus Flight API implementation using curl


I want to use Amadeus Flight API using curl. So help me to implement the api using core PHP. If you can provide me with all three example(get, post, put, delete) of rest api in php that would be great.


Solution

  • My employer (dahabtours GmbH) has agreed to release our API wrapper Class in order to give something back to the opensource community, since there is no official PHP SDK yet. This makes using the self-service API in PHP a lot easier.

    https://github.com/dahabtours/amadeus-php-sdk

    $amadeus_api = new AmadeusDahabtours\SelfServiceApiClient({CLIENT_ID}, {CLIENT_SECRET});
    
    $amadeus_results = $amadeus_api->lowFares([
        'origin'        => 'FRA',
        'destination'   => 'CAI',
        'departureDate' => '2019-07-15',
    ]);