Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PHP BaseBuy.Auto API SDK

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

About

SDK for BaseBuy Auto API on PHP

Resources

License

Releases

No releases published

Packages

No packages published

Languages