2017 © Pedro Peláez
 

library php-livex

A PHP API adapter for the Liv-Ex fine wine stock exchange platform

image

conduit/php-livex

A PHP API adapter for the Liv-Ex fine wine stock exchange platform

  • Saturday, January 20, 2018
  • by tomlawton89
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PHP-LivEx

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)

Important Limitations

  • Currently, only CellarView2 functionality is implemented. Full coverage of all APIs are planned.

Feature Roadmap

  1. CellarView2 (Working, ~50% test coverage)
  2. LWIN API
  3. Logistics API
  4. Broking APIs
  5. Valuations
  6. Direct Market Access / Exchange Integration
  7. Trading Alerts
  8. My Account APIs

Dependencies

  • PHP 5.5.38 or newer
  • PHP cURL (Usually included in PHP itself)
  • Liv-Ex API Credentials
  • Composer

Installation

  • Run composer require conduit\php-livex:dev-master
  • Run composer install
  • Include the autoloader if you haven't already - require './vendor/autoload.php';

Usage

Note: There is HTML API class documentation available in docs/api., (*3)

Namespaces and organsiation

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)

Quick Example: Get all CellarView items


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.

Quick Example: Find all items by sub account code


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

Quick Example: Find all items by LWIN


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

Quick Example: Find all items by buyer reference


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"

Unit Tests

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)

API Documentation Generator

To regenerate the API docs, using PHPDocumentor, run composer run docs, (*8)

The Versions

20/01 2018

dev-master

9999999-dev

A PHP API adapter for the Liv-Ex fine wine stock exchange platform

  Sources   Download

GPL-2.0 GPL2

The Requires

  • php ^5.5 || ^7.0

 

The Development Requires

by Tom Lawton