gueststream/sdk
Composer 安装命令:
composer require gueststream/sdk
包简介
A PHP wrapper for Gueststream's API
关键字:
README 文档
README
Installing via Composer
The recommended way to install the Gueststream VRP library is through Composer.
# Install Composer curl -sS https://getcomposer.org/installer | php # Add Gueststream SDK as a dependency php composer.phar require gueststream/sdk dev-master@dev
or alternatively, you can add it directly to your composer.json file.
{
"require": {
"gueststream/sdk"
}
}
Then install the libraries via Composer:
composer install
Finally, require Composer's autoloader in your PHP script:
require __DIR__.'/vendor/autoload.php';
Usage
To begin using this library, initialize the Gueststream VRP object with your API key:
$vrp = new \Gueststream\Vrp($apikey);
You can then use the VRP object to search for all units.
$vrp = new \Gueststream\Vrp($apikey); $result = $vrp->search(); $results = $result['results'];
Quickstart Guide
Getting Started
This quickstart demonstrates a simple way to get started using the Gueststream VRP API. Following these steps, it should take you no more than 5-10 minutes to have a fully functional property search.
Creating the object
You simply include the library and create a new \Gueststream\Vrp object using your API Key:
require __DIR__.'/../vendor/autoload.php'; $vrp = new \Gueststream\Vrp('my-api-key');
Loading a single Unit/Property
Once you've created the object, you can use the object to load a unit as shown.
$result = $vrp->getUnit('unit_slug');
Performing an Availability Search on all Properties
To search, you use the same \Gueststream\Vrp object and search using arrival and departure keys. This can be accomplished with 3 lines of code:
$search['arrival'] = "03/21/2015"; $search['departure'] = "03/28/2015"; $result = $vrp->search($search);
Then you can process, interact and display the results however you wish. The code below simply shows the resulting unit slug and name for each available unit for the provided stay window.
$units = $result['results']; foreach ($units as $a_unit) { echo $a_unit['Name'] . "\n"; echo $a_unit['Slug'] . "\n"; }
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request from github
gueststream/sdk 适用场景与选型建议
gueststream/sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2014 年 12 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「gueststream」 「vrp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 gueststream/sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 gueststream/sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 gueststream/sdk 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
IQVault SOAP API Wrapper
IQWare SOAP API Wrapper
A PSR-7 compatible library for making CRUD API endpoints
HomeAway Payment Island Alternate Tokenization service API wrapper
Booking confirmation class used in response to successful bookings.
Vacation Rental Property (unit) Class
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-24