定制 basebuy/basebuy-sdk-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  1. BaseBuy.Auto API page: Ru,
  2. sample app

Getting started

Installation

  1. Clone repo to your project.
  2. Paste following code
    require_once '/path/to/cloned/repo/BasebuyAutoApi.php';
    

Using BaseBuy.Auto API requires following steps

  1. Obtain API_KEY (token) by buying database at http://basebuy.ru. Note: API_KEY is constant that you get for access to BaseBuy.Auto API.

  2. 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

  1. Library throws exceptions in case of

    * response status isn't equal 2**
    * I/O error(see [requests](https://github.com/rmccue/Requests))
    

Running tests

  1. Clone this repo.
  2. Install composer
  3. Run composer install
  4. Create sample.php with API_KEY constant.
  5. Run it

统计信息

  • 总下载量: 1.33k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2020-08-18