PHP code example of mafikes / kiwiapi

1. Go to this page and download the library: Download mafikes/kiwiapi library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mafikes / kiwiapi example snippets


$client = new \Mafikes\KiwiApi\Client();

$client->getLocations()->searchByQuery([
    'term' => 'PRG',
    'locale' => 'en-US',
    'location_types' => 'airport',
    'limit' => '10',
    'active_only' => 'true',
    'sort' => 'name'
]);

$client->getAirlines()->getAll();

$client->getAirlines()->getImage('JQ'); // id airline

$client->getFlights()->searchByQuery([
    'fly_from' => 'PRG',
    'fly_to' => 'LGW',
    'date_from' => '08/08/2019',
    'date_to' => '08/09/2019',
    'partners' => 'picky',
]);