承接 konfig/nuitee-lite-php-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

konfig/nuitee-lite-php-sdk

最新稳定版本:v1.8.0

Composer 安装命令:

composer require konfig/nuitee-lite-php-sdk

包简介

The **Lite API** can be used to to do the following Get room rates & availability for a set of hotels Select a specific hotel with room availability and make a booking Manage the bookings - retrieve and cancel existing bookings Get static content for hotels, search hotels by destination

README 文档

README

The Lite API can be used to to do the following

Get room rates & availability for a set of hotels Select a specific hotel with room availability and make a booking Manage the bookings - retrieve and cancel existing bookings Get static content for hotels, search hotels by destination

Installation & Usage

Requirements

This library requires PHP ^8.0

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/konfig-dev/nuitee-lite-php-sdk.git"
    }
  ],
  "require": {
    "konfig/nuitee-lite-php-sdk": "1.8.0"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/nuitee-lite-php-sdk/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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

// Configure API key authorization: apikeyAuth
$config = Nuitee\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Nuitee\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

// Setting host path is optional and defaults to https://api.liteapi.travel/v1.0
// Nuitee\Configuration::getDefaultConfiguration()->setHost("https://api.liteapi.travel/v1.0");

$apiInstance = new Nuitee\Api\BookApi(
    // 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
);

$book_request = new \Nuitee\Model\BookRequest([
        "prebook_id" => "prebook_id_example",
    ]);

try {
    $result = $apiInstance->book(
        book_request: $book_request
    );
    print_r($result->$getData());
    print_r($result->$getGuestLevel());
    print_r($result->$getSandbox());
} catch (\Exception $e) {
    echo 'Exception when calling BookApi->book: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.liteapi.travel/v1.0

Class Method HTTP request Description
BookApi book POST /rates/book hotel rate book
BookApi prebook POST /rates/prebook hotel rate prebook
BookingManagementApi cancel PUT /bookings/{bookingId} Booking cancel
BookingManagementApi listBookings GET /bookings Booking list
BookingManagementApi retrieve GET /bookings/{bookingId} Booking retrieve
GuestAndLoyaltyApi getGuestId GET /guests guests
SearchApi getHotelRates GET /hotels/rates hotel full rates availability
SearchApi getHotels GET /hotels hotel minimum rates availability
StaticDataApi getHotel GET /data/hotel Hotel details
StaticDataApi listCities GET /data/cities City list
StaticDataApi listCountries GET /data/countries Country list
StaticDataApi listCurrencies GET /data/currencies Currency list
StaticDataApi listHotels GET /data/hotels Hotel list
StaticDataApi listIataCodes GET /data/iataCodes IATA code list

Models

Authorization

apikeyAuth

  • Type: API key
  • API key parameter name: X-API-Key
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

About this package

This PHP package is automatically generated by Konfig:

  • API version: 1.0.0
    • Package version: 1.8.0

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: unlicense
  • 更新时间: 2023-03-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固