CrtPhpClient
Requirements
- PHP 5.3 or later
- php-curl
Getting Started
Downdload and unzip, (*1)
$ wget https://github.com/CrtDev/CrtPhpClient/archive/master.zip
$ unzip master.zip
<?php
require_once('CrtPhpClient-master/init.php');
use CrtPhpClient\Crt;
$crt = new Crt();
$models = $crt->catalog()
->mark('TOYOTA')
->market('JAPAN')
->model();
print_r($models);
// Array
// (
// [0] => ALLEX
// [1] => ALLION
// [2] => ALPHARD
// ...
Installation via Composer
$ composer require crtdev/crt-php-client:1.*@dev
<?php
require __DIR__.'/vendor/autoload.php';
use CrtPhpClient\Crt;
$crt = new Crt();
print_r($crt->catalog()->mark());
// Array
// (
// [0] => AUDI
// [1] => BMW
// [2] => CHEVROLET
// ...
Tests
$ composer require crtdev/crt-php-client:1.*@dev
$ phpunit vendor/crtdev/crt-php-client
API documentation
You can browse the whole documentation at crt.ru/api/doc., (*2)
There is an optional api format - .json and .xml:, (*3)
By calling an URL with the parameter ?_doc=1, you will get the corresponding documentation:, (*4)