redzjovi/php-hotelbeds-hotel

There is no license information available for the latest version (dev-main) of this package.

dev-main 2022-09-16 09:47 UTC

This package is auto-updated.

Last update: 2024-04-16 13:29:21 UTC


README

Installation

Composer

composer require redzjovi/php-hotelbeds-hotel:dev-master

Laravel

You can publish the migration and the config/hotelbeds-php.php with:

php artisan hotelbeds-hotel:install

How to test with PHPUnit

phpunit --filter /test_get_languages$/
phpunit --group types

Add new connection database hotelbeds-hotel in config/database.php.

API

Hotel Content API

Types

Languages
use RedzJovi\HotelbedsHotel\Client;
use Redzjovi\HotelbedsHotel\Requests\Types\Languages\IndexRequest as TypesLanguagesIndexRequest;

$client = new Client(
    getenv('HOTELBEDS_HOTEL_API_KEY'),
    getenv('HOTELBEDS_HOTEL_SECRET'),
    getenv('HOTELBEDS_HOTEL_ENVIRONMENT')
);

$request = new TypesLanguagesIndexRequest();
$response = $$client->getLanguages($request);