basebuy/basebuy-sdk-php
最新稳定版本:1.0.0
Composer 安装命令:
composer require basebuy/basebuy-sdk-php
包简介
Wrapper for BasebuyAutoApi
README 文档
README
Requirements
PHP 5.3 or above
Links
- BaseBuy.Auto API page: Ru,
- sample app
Getting started
Installation
- Clone repo to your project.
- Paste following code
require_once '/path/to/cloned/repo/BasebuyAutoApi.php';
Using BaseBuy.Auto API requires following steps
-
Obtain API_KEY (token) by buying database at http://basebuy.ru. Note:
API_KEYis constant that you get for access to BaseBuy.Auto API. -
Than you can use BaseBuy.Auto API.
$basebuyAutoApi = new BasebuyAutoApi( new CurlGetConnector( API_KEY ) ); // check last information update date $basebuyAutoApi->typeGetDateUpdate(); // get database file $downloadedFilePath = $basebuyAutoApi->typeGetAll(); // catch error codes } catch( Exception $e ){ if ( $e->getCode() == 401 ) ... }
Side notes
-
Library throws exceptions in case of
* response status isn't equal 2** * I/O error(see [requests](https://github.com/rmccue/Requests))
Running tests
- Clone this repo.
- Install composer
- Run
composer install - Create
sample.phpwithAPI_KEYconstant. - Run it
统计信息
- 总下载量: 1.33k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2020-08-18