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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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

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 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:

And methods to fetch dictionaries.

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

PHP Build Version
Package Version
Requires nesbot/carbon Version ^1.22
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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tmconsulting/hotelbook-php-sdk contains the following files

Loading the files please wait ....