1. Go to this page and download the library: Download cryptoweb/infoflot-api 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/ */
cryptoweb / infoflot-api example snippets
use CryptoWeb\InfoflotApi\Client;
use CryptoWeb\InfoflotApi\ClientOptions;
$client = new Client(
new GuzzleHttp\Client(),
new ClientOptions(
apiKey: 'your-api-key',
)
);
use CryptoWeb\InfoflotApi\Enums\ShipTypeAsOnMainSiteEnum;
use CryptoWeb\InfoflotApi\Factory;
$infoflot = new Factory($client);
$infoflot->cruises()
->type(ShipTypeAsOnMainSiteEnum::TURKISH_RIVERA)
->nights(5)
->get();
$infoflot->cruises(100500)
->get();
$infoflot->cruises(100500)
->cabins()
->get();
$infoflot->cruises(100500)
->cabins()
->search()
->get();
// etc...
use CryptoWeb\InfoflotApi\Builders\Cruises;
use CryptoWeb\InfoflotApi\Builders\CruisesId;
use CryptoWeb\InfoflotApi\Builders\CruisesIdCabins;
use CryptoWeb\InfoflotApi\Builders\CruisesIdCabinsSearch;
use CryptoWeb\InfoflotApi\Enums\CruiseTypeEnum;
// get all cruises
$cruisesBuilder = new Cruises($client);
$cruisesBuilder->type(CruiseTypeEnum::RIVER)
$cruisesBuilder->nights(5);
$cruisesResult = $cruisesBuilder->get();
// or
$cruisesResult = (new Cruises($client))
->type(CruiseTypeEnum::SEA)
->nights(5, 6, 7)
->get();
// get cruise by id
$cruiseBuilder = new CitiesId($client);
$cruiseBuilder->id(311);
$cruiseResult = $cruiseBuilder->get();
// get cruise cabins by id
$cruiseCabinsResult = (new CruisesIdCabins($client))
->id(311)
->get();
// etc...