PHP code example of vinou / api-connector

1. Go to this page and download the library: Download vinou/api-connector library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vinou / api-connector example snippets


$api = new \Vinou\ApiConnector\Api (
        TOKEN_FOR_INSTANCE,
        AUTHID_FOR_VINOU_CUSTOMER	
      );

define(VINOU_CONFIG_DIR, '/Path/to/settings.yml');

$api = new \Vinou\ApiConnector\Api();

$session = new \Vinou\ApiConnector\Session\Session ();
$session::setValue('language','de');
	
// returns all public wines of your Vinou-Office Account as php array
$api->getWinesAll()


        ne('VINOU_ROOT', realpath('./'));
        define('VINOU_MODE', 'Ajax');
        define('VINOU_CONFIG_DIR', '../config/');

        header('Cache-Control: no-cache, must-revalidate');
        header('Content-type: application/json');

        // INIT SESSION BEFORE ALL THE OTHER STUFF STARTS
        $session = new \Vinou\ApiConnector\Session\Session ();
        $session::setValue('language','de');

        $ajax = new \Vinou\ApiConnector\Ajax ();
        $ajax->run();