mafikes / kiwiapi
该软件包已被废弃,不再维护。未建议替代软件包。
Kiwi.com - PHP 客户端
1.0.1
2019-04-17 10:11 UTC
Requires
- php: >=5.4.0
- ext-json: *
- guzzlehttp/guzzle: ^6.3
This package is auto-updated.
Last update: 2022-10-25 08:28:50 UTC
README
用于与kiwi.com API通信的PHP库。
安装
composer require mafikes/kiwiapi
示例
初始化客户端
$client = new \Mafikes\KiwiApi\Client();
位置查询
$client->getLocations()->searchByQuery([ 'term' => 'PRG', 'locale' => 'en-US', 'location_types' => 'airport', 'limit' => '10', 'active_only' => 'true', 'sort' => 'name' ]);
获取所有航空公司
$client->getAirlines()->getAll();
获取航空公司链接标志
$client->getAirlines()->getImage('JQ'); // id airline
获取航班基本查询
$client->getFlights()->searchByQuery([ 'fly_from' => 'PRG', 'fly_to' => 'LGW', 'date_from' => '08/08/2019', 'date_to' => '08/09/2019', 'partners' => 'picky', ]);
更多示例可以在示例文件夹中找到。
待办事项
- 搜索深链接
- 检查航班
- 保存预订
- 确认支付
- webhooks