zoltanlaca/isklad-api-connector
最新稳定版本:v1.6
Composer 安装命令:
composer require zoltanlaca/isklad-api-connector
包简介
Lightweight connector to isklad.com rest API
README 文档
README
The iSklad API Connector library enables you to communicate with iSklad API.
API documentation: isklad/egon-api-documentation
Requirements
Installation
You can use Composer or simply Download the Release
Composer
The preferred method is via composer. Follow the installation instructions if you do not already have composer installed.
Once composer is installed, execute the following command in your project root to install this library:
composer require zoltanlaca/isklad-api-connector
Finally, be sure to include the autoloader:
require_once '/path/to/your-project/vendor/autoload.php';
Download the Release
If you prefer not to use composer, you can download the package in its entirety. The Releases page lists all stable versions.
Uncompress the zip file you download, and include the autoloader in your project:
require_once '/path/to/isklad-api-connector/vendor/autoload.php';
Examples
See the examples/ directory for examples of the key features.
Basic Example
// import classes use ZoltanLaca\IskladApiConnector\Connector; use ZoltanLaca\IskladApiConnector\ConnectorException; // include composer autoload file include_once dirname(__DIR__) . '/vendor/autoload.php'; // create connector instance $connector = New Connector('123456', 'xxx', 'xxx'); try { $response = $connector // set the input data to the request ->createRequest('GetOrderStatus', [ 'original_order_id' => 123, ]) // send to api ->send() // get parsed response from connector ->getResponseHeaders(); // print it print_r($response); } catch (ConnectorException $exception) { // handle error print_r(sprintf('Connection ERROR: %s', $exception->getMessage())); }
统计信息
- 总下载量: 1.11k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-01-14