travel-paq/packages-api

Api para la búsqueda y reserva de paquetes turísticos de Tour Operadores.


README

Latest Version on Packagist Software License Build Status Quality Score Total Downloads

Api para la búsqueda y reserva de paquetes turísticos de Tour Operadores

Install

Via Composer

$ composer require travel-paq/packages-api

Usage


require "vendor/autoload.php";

use TravelPAQ\PackagesAPI\PackagesAPI;

$params = [
	'order_type' => "ASC",
	'order_field' => "PRICE",
	'currency' => "USD",
	'origin_place' => "EZE",
	'destination_place' => "IGR",
	'month_departure' => 9,
	'year_departure' => 2016,
	'Room' => [
		[
			'adult' => 2,
			'Children' => []
		]
	]
];

$tp = new PackagesAPI(['api_key' => 'YOUR_API_KEY','item_per_page' => 10]);
$list = json_decode($tp->getPackageList($params),true);
var_dump($list);
$package = json_decode($tp->getPackage($list['result'][0]['id']));
var_dump($package);

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

License

The MIT License (MIT). Please see License File for more information.