emerging-travel/papi-sdk-php
最新稳定版本:v0.0.4
Composer 安装命令:
composer require emerging-travel/papi-sdk-php
包简介
pAPI SDK is a PHP SDK for ETG APIv3
README 文档
README
pAPI SDK is a PHP SDK for ETG APIv3. The abbreviation "pAPI" stands for "Partner API". To know more about the benefits of our API integration or to sign up please check our website.
Requirements
- PHP 7.2+
The package depends on the following:
Installation
composer require emerging-travel/papi-sdk-php
Quickstart
To start using ETG APIv3 you need a key, which you received after registration.
A key is a combination of an id and uuid. These are passed into each request as a Basic Auth header after initialization.
APIv3 supports all arguments provided by guzzle.
require 'vendor/autoload.php'; use PAPI\APIv3\Client; $client = new Client('1000:022a2cf1-d279-02f3-9c3c-596aa09b827b');
Then you can use all available methods. Say you want to check an overview of the available methods (which is api/b2b/v3/overview endpoint), you do:
$overview = $client->overview()
Note: if you don't provide your headers and specifically your User-Agent in requests options then it will be automatically added, ex. papi_sdk/v1.0.0 GuzzleHttp/7 (php/7.4.20)
统计信息
- 总下载量: 1.88k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-06-25