Download the PHP package tmconsulting/hotelbook-php-sdk without Composer
On this page you can find all versions of the php package tmconsulting/hotelbook-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package hotelbook-php-sdk
PHP Hotelbook SDK
This SDK is used to connect to the hotelbook and use it methods for a 3-d party API.
- Installation
- Get started
- Api Reference
- Contact us
Installation
Get started
First of all, you will need to have credentials for the hotelbook.
The config with credentials looks like this.
(if yoy pass anything not valid, it throws an exception while creating the main instance)
After that, include the library and create an basic instance of it.
Now you can use all the methods of the hotelbook sdk. For example:
E.g search for hotels:
Now the result will be an instance of ResultProceeder with all of the results
Handling errors and Proceeding results.
If method has an error, it throws an exception that you can handle and than run getErrors the result.
Every method returns an object (if it doesn't throw an exception), that has to methods:
- getItems()
- getErrors()
getItems
method returns all of the items returned from the method.
getErrors
method return all of the errors returned from hotelbook.
So that you can do something like:
API Reference
Meta Explanation
All static data API $methods are available through $main->{$YOUR_METHOD_NAME}
.
It gives an object with results (items, errors). (Described above.)
Available method
To use any of methods, you have to create an instance of HotelBook SDK. Described here
Currently available methods:
- Search (Search for hotels)
- Async Search (Search for hotels in Asynchronous mode )
- Detail (Hotel Details)
- Book Order (Book a Hotel)
- Cancel Order (Cancel booking)
- Confirm Order (Confirm booking )
- Annulate Order (Cancel booking after confirm)
And methods to fetch dictionaries.
- Country - (Fetch all available countries)
- City - (Fetch all available Cities)
- Location - (Fetch all available Locations)
- Resort - (Fetch all available Resorts)
- HotelType - (Fetch all available Hotel Types)
- HotelCategory - (Fetch all available Hotel Categories)
- HotelFacility - (Fetch all available Hotel Facilities)
- HotelList- (Fetch all available Hotel Lists)
- Meal - (Fetch all available Meal Types)
- MealBreakfast - (Fetch all available Meal Breakfast Types)
- RoomSize - (Fetch all available Room Sizes)
- RoomType - (Fetch all available Room Types)
- RoomAmenity - (Fetch all available Room Amenities)
- RoomView - (Fetch all available Room Views)
- CurrencyRate - (Fetch currancy rates)
Fetch Countries
Meta-explanation
Fetch countries method is used to fetch all of the countries exist in the hotelbook database. So you can use it as a search parameter, etc...
Basic example
Fetch Cities
Meta-explanation
Fetch cities is used to make search more deeper, so you can use it as a search parameter. Also, you can search cities by a country (So you fetch all the cities in a country.)
Basic examples
Fetch all cities exist in the Database.
Fetch all cities by country.
Contact us.
If you have any issues or questions regarding the API or the SDK it self, you are welcome to create an issue, or
You can write an Email to [email protected]
or [email protected]
All versions of hotelbook-php-sdk with dependencies
moneyphp/money Version ^3.0
psr/log Version ^1.0
tmconsulting/support Version ^1.0
monolog/monolog Version ^1.18
guzzlehttp/guzzle Version ^6.3
symfony/options-resolver Version ^4.0