Skip to content

Latest commit

 

History

History
129 lines (86 loc) · 3.98 KB

File metadata and controls

129 lines (86 loc) · 3.98 KB

Unifapi\Sdk\HotelsApi

All URIs are relative to https://api.unifapi.com, except if the operation defines another base path.

Method HTTP request Description
hotelsInfoPost() POST /hotels/info Get Hotels detail
hotelsSearchPost() POST /hotels/search Search Hotels

hotelsInfoPost()

hotelsInfoPost($hotel_info_request): \Unifapi\\Sdk\Model\HotelsInfoPost200Response

Get Hotels detail

Run one live Hotels detail lookup for a hotel id from /hotels/search and receive the full profile, including class rating, address, phone, description, guest reviews, images, and prices.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\HotelsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$hotel_info_request = new \Unifapi\\Sdk\Model\HotelInfoRequest(); // \Unifapi\\Sdk\Model\HotelInfoRequest

try {
    $result = $apiInstance->hotelsInfoPost($hotel_info_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HotelsApi->hotelsInfoPost: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
hotel_info_request \Unifapi\Sdk\Model\HotelInfoRequest [optional]

Return type

\Unifapi\Sdk\Model\HotelsInfoPost200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

hotelsSearchPost()

hotelsSearchPost($hotel_search_request): \Unifapi\\Sdk\Model\HotelsSearchPost200Response

Search Hotels

Run one live Hotels search and receive ranked hotel listings for a location and stay dates, including hotel id, class rating, guest reviews, and nightly prices. Pass a hotel id to /hotels/info for full details.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\HotelsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$hotel_search_request = new \Unifapi\\Sdk\Model\HotelSearchRequest(); // \Unifapi\\Sdk\Model\HotelSearchRequest

try {
    $result = $apiInstance->hotelsSearchPost($hotel_search_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HotelsApi->hotelsSearchPost: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
hotel_search_request \Unifapi\Sdk\Model\HotelSearchRequest [optional]

Return type

\Unifapi\Sdk\Model\HotelsSearchPost200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]