dev-master
9999999-devA PHP API adapter for the Liv-Ex fine wine stock exchange platform
GPL-2.0 GPL2
The Requires
- php ^5.5 || ^7.0
The Development Requires
by Tom Lawton
Wallogit.com
2017 © Pedro Peláez
A PHP API adapter for the Liv-Ex fine wine stock exchange platform
A composer-installable set of classes for easily interacting with the various Liv-Ex APIs., (*1)
See http://www.developers.liv-ex.com/ for more information., (*2)
composer require conduit\php-livex:dev-master
composer install
require './vendor/autoload.php';
Note: There is HTML API class documentation available in docs/api., (*3)
PHP-LivEx is organised into a series of namespaces, closely matching the API categories on the Liv-Ex developer's site. Right now, these are:, (*4)
Conduit\LivEx\Logistics
Conduit\LivEx\LWIN, (*5)
use \Conduit\LivEx\Logistics\CellarView2; use \Conduit\LivEx\Error; $cv = new CellarView2('<your api key>','<your api secret>','DEV'); $r = $cv->getAll(); if(Error::isError($r)) { $r->pretty(); return; } var_dump($r); // An array of CellarView items.
use \Conduit\LivEx\Logistics\CellarView2; use \Conduit\LivEx\Error; $cv = new CellarView2('<your api key>','<your api secret>','DEV'); $r = $cv->findBySubAccount('subaccountcode'); if(Error::isError($r)) { $r->pretty(); return; } var_dump($r); // An array of CellarView items, attached to "subaccountcode".
use \Conduit\LivEx\Logistics\CellarView2; use \Conduit\LivEx\Error; $cv = new CellarView2('<your api key>','<your api secret>','DEV'); $r = $cv->findByLwin('100598920111200750'); if(Error::isError($r)) { $r->pretty(); return; } var_dump($r); // An array of CellarView items of type LWIN 100598920111200750
use \Conduit\LivEx\Logistics\CellarView2; use \Conduit\LivEx\Error; $cv = new CellarView2('<your api key>','<your api secret>','DEV'); $r = $cv->findByBuyerRef('buyer-ref'); if(Error::isError($r)) { $r->pretty(); return; } var_dump($r); // An array of CellarView items linked with buyer reference "buyer-ref"
PHP-LivEx comes bundled with PHPUnit tests and a test runner. Full coverage is planned., (*6)
To run the test suite, make sure you have the require-dev dependencies installed, then run composer run test., (*7)
To regenerate the API docs, using PHPDocumentor, run composer run docs, (*8)
A PHP API adapter for the Liv-Ex fine wine stock exchange platform
GPL-2.0 GPL2