The library is in active development. Not ready for production yet.
This library is just simple wrapper around booking com API (https://developers.booking.com/api/).
composer require digitalbrands/booking-com-sdk
$client = Client::create([
'login' => 'your_login',
'password' => 'your_password',
'timeout' => 5, // Optional
'v' => '2.2' // Optional
]);
Not implemented yet
Not implemented yet
$models = $client->autocomplete(new AutocompleteQuery('test'));
foreach ($models as $model){
print $model->getId();
print $model->getName();
// etc
}
$models = $client->getChainTypes((new ChainTypesQuery());
foreach ($models as $model){
print $model->getId();
print $model->getName();
// etc
}
$sinceDate=new \DateTime();
$model = $client->getChangedHotelsInfo(new ChangedHotelsQuery($sinceDate));
//Closed hotels
$model->getClosedHotels();
//Changed hotels
$model->getChangedHotels();
$models = $client->getCities((new CitiesQuery()));
foreach ($models as $model){
print $model->getId();
print $model->getName();
// etc
}
$models = $client->getCountries((new CountriesQuery()));
foreach ($models as $model){
print $model->getId();
print $model->getName();
// etc
}
$models = $client->getDistricts((new DistrictsQuery()));
foreach ($models as $model){
print $model->getId();
print $model->getName();
// etc
}
$models = $client->getFacilityTypes((new FacilityTypesQuery()));
foreach ($models as $model){
print $model->getId();
print $model->getName();
// etc
}
$models = $client->getHotelFacilityTypes((new HotelFacilityTypesQuery()));
foreach ($models as $model){
print $model->getId();
print $model->getName();
// etc
}
$models = $client->getHotels((new HotelsQuery()));
foreach ($models as $model){
print $model->getId();
print $model->getInfo();
// etc
}
$models = $client->getHotelThemeTypes((new HotelThemeTypesQuery()));
foreach ($models as $model){
print $model->getId();
print $model->getName();
// etc
}
$models = $client->getHotelTypes((new HotelTypesQuery()));
foreach ($models as $model){
print $model->getId();
print $model->getName();
// etc
}
$models = $client->getPaymentTypes((new PaymentTypesQuery()));
foreach ($models as $model){
print $model->getId();
print $model->getName();
// etc
}
$models = $client->getRegions((new RegionsQuery()));
foreach ($models as $model){
print $model->getId();
print $model->getName();
// etc
}
$models = $client->getRoomFacilityTypes((new RoomFacilityTypesQuery()));
foreach ($models as $model){
print $model->getId();
print $model->getName();
// etc
}
$models = $client->getRoomTypes((new RoomTypesQuery()));
foreach ($models as $model){
print $model->getId();
print $model->getName();
// etc
}
Please open an issue for support.
Feel free to send a pull request!