Image Description
redzjovi/php-hotelbeds-hotel
  • 0 Stars
  • 2 years ago

PHP Hotelbeds Hotel

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);